File tree Expand file tree Collapse file tree 1 file changed +22
-12
lines changed
Expand file tree Collapse file tree 1 file changed +22
-12
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments