Skip to content

Commit 564c03c

Browse files
committed
update readme
1 parent 35ac26d commit 564c03c

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,32 @@ const ctMock = new CommercetoolsMock({
2727
silent: true,
2828
})
2929

30-
beforeAll(() => {
31-
ctMock.start()
30+
describe('A module', () => {
31+
beforeAll(() => {
32+
ctMock.start()
3233

33-
ctMock.project().add('type', {
34-
...getBaseResourceProperties()
35-
key: 'my-customt-type',
36-
fieldDefinitions: [],
34+
ctMock.project().add('type', {
35+
...getBaseResourceProperties()
36+
key: 'my-customt-type',
37+
fieldDefinitions: [],
38+
})
3739
})
38-
})
3940

40-
afterAll(() => {
41-
ctMock.stop()
42-
})
41+
afterAll(() => {
42+
ctMock.stop()
43+
})
44+
45+
afterEach(() => {
46+
ctMock.clear()
47+
})
48+
49+
test('my function', async () => {
50+
ctMock.project().add('customer',customerFixture)
4351

44-
afterEach(() => {
45-
ctMock.clear()
52+
const res = await myFunction()
53+
54+
expect(res).toEqua;(true)
55+
})
4656
})
4757
```
4858

0 commit comments

Comments
 (0)