eyedea-io / eyedea-io/syncano-test
Invalidate Core stub
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
In case like this on each iteration there should be created new Core stub with new data
```
it.each(validBookings)('should return valid data', async booking => {
const mocks = createSyncanoCoreMock({
endpoint: {
get: stub().resolves({inOrganization: true}),
},
user: {
findOrFail: stub().resolves({
hubUserKey: 'xyz',
}),
},
data: {
resource: {
find: resourceStub,
where: stub().fn({
firstOrFail: resourceStub,
}),
},
booking: {
fields: stub().fn({
create: bookingStub,
}),
where: stub().fn({
list: bookingWhereListStub,
}),
},
},
})
const result = await run('create', {args: booking, meta}, {mocks})
expect(result.code).toEqual(200)
})
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.