Skip to content

Commit 33dabc0

Browse files
committed
fetchMock.done() is not needed anymore
1 parent 857ff1f commit 33dabc0

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/LiveComponent/assets/test/controller/model.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ describe('LiveController data-model Tests', () => {
233233
await waitFor(() => expect(element).toHaveTextContent('Checkbox 2 is checked'));
234234

235235
expect(controller.dataValue).toEqual({form: {check1: '1', check2: '1'}});
236-
237-
// assert all calls were done the correct number of times
238-
fetchMock.done();
239236
});
240237

241238
it('sends correct data for initially checked checkbox fields', async () => {
@@ -271,9 +268,6 @@ describe('LiveController data-model Tests', () => {
271268
await waitFor(() => expect(element).toHaveTextContent('Checkbox 1 is unchecked'));
272269

273270
expect(controller.dataValue).toEqual({form: {check1: null, check2: '1'}});
274-
275-
// assert all calls were done the correct number of times
276-
fetchMock.done();
277271
});
278272

279273
it('sends correct data for array valued checkbox fields', async () => {
@@ -309,9 +303,6 @@ describe('LiveController data-model Tests', () => {
309303
await waitFor(() => expect(element).toHaveTextContent('Checkbox 2 is checked'));
310304

311305
expect(controller.dataValue).toEqual({form: {check: ['foo', 'bar']}});
312-
313-
// assert all calls were done the correct number of times
314-
fetchMock.done();
315306
});
316307

317308
it('sends correct data for array valued checkbox fields with initial data', async () => {
@@ -347,9 +338,6 @@ describe('LiveController data-model Tests', () => {
347338
await waitFor(() => expect(element).toHaveTextContent('Checkbox 1 is unchecked'));
348339

349340
expect(controller.dataValue).toEqual({form: {check: ['bar']}});
350-
351-
// assert all calls were done the correct number of times
352-
fetchMock.done();
353341
});
354342

355343
it('sends correct data for select multiple field', async () => {
@@ -385,9 +373,6 @@ describe('LiveController data-model Tests', () => {
385373
await waitFor(() => expect(element).toHaveTextContent('Select: foo bar Option 2 is selected'));
386374

387375
expect(controller.dataValue).toEqual({form: {select: ['foo', 'bar']}});
388-
389-
// assert all calls were done the correct number of times
390-
fetchMock.done();
391376
});
392377

393378
it('sends correct data for select multiple field with initial data', async () => {
@@ -429,9 +414,6 @@ describe('LiveController data-model Tests', () => {
429414
await waitFor(() => expect(element).toHaveTextContent('Select: foo bar Option 2 is unselected'));
430415

431416
expect(controller.dataValue).toEqual({form: {select: []}});
432-
433-
// assert all calls were done the correct number of times
434-
fetchMock.done();
435417
});
436418

437419
it('updates correctly when live#update is on a parent element', async () => {

0 commit comments

Comments
 (0)