Skip to content

Commit e7df0e5

Browse files
committed
Add delay to ensure external file change detection in tests
1 parent d80cfc3 commit e7df0e5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/generic/text-file.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ describe('TextFile', () => {
390390
expect(tf.hasExternalFileChanged()).toBe(false);
391391

392392
fsUtils.writeTextFile(TEST_FILE, changedContent);
393+
await new Promise(resolve => setTimeout(resolve, 500));
394+
393395
expect(tf.hasExternalFileChanged()).toBe(true);
394396
expect(tf.hasExternalFileChanged()).toBe(false);
395397
});

0 commit comments

Comments
 (0)