Skip to content

Commit a125f52

Browse files
committed
reduce reproduction code
1 parent 4d51f42 commit a125f52

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

packages/codegen/src/runner.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,12 @@ describe('runCMKInWatchMode', () => {
4343

4444
console.log('update file');
4545
await writeFile(textFilePath, '1');
46-
await vi.waitFor(() => {
47-
assert(globalThis.changeCount === 1, `Expected changeCount to be 1, but got ${globalThis.changeCount}`);
48-
});
46+
await sleep(1000);
47+
assert(globalThis.changeCount === 1, `Expected changeCount to be 1, but got ${globalThis.changeCount}`);
4948

5049
console.log('update file');
5150
await writeFile(textFilePath, '2');
52-
await vi.waitFor(() => {
53-
assert(globalThis.changeCount === 2, `Expected changeCount to be 2, but got ${globalThis.changeCount}`);
54-
});
51+
await sleep(1000);
52+
assert(globalThis.changeCount === 2, `Expected changeCount to be 2, but got ${globalThis.changeCount}`);
5553
});
5654
});

0 commit comments

Comments
 (0)