Skip to content

Commit 2c996de

Browse files
authored
test: wait for useFind execution before emitting removed event (#49)
1 parent d32eb52 commit 2c996de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/useFind.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ describe('Find composition', () => {
406406
expect(findComposition && findComposition.data.value.length).toStrictEqual(0);
407407
});
408408

409-
it('should listen to "remove" events', () => {
409+
it('should listen to "remove" events', async () => {
410410
expect.assertions(2);
411411

412412
// given
@@ -425,6 +425,7 @@ describe('Find composition', () => {
425425
mountComposition(() => {
426426
findComposition = useFind('testModels');
427427
});
428+
await nextTick();
428429

429430
// when
430431
emitter.emit('removed', testModel);

0 commit comments

Comments
 (0)