Skip to content

Commit 078d607

Browse files
committed
test(codegen): retry flaky tests
1 parent b857cc8 commit 078d607

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/codegen/src/runner.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ describe('runCMKInWatchMode', () => {
193193
await expect(access(iff.join('generated/src/a.module.css.d.ts'))).resolves.not.toThrow();
194194
await expect(access(iff.join('generated/src/old.module.css.d.ts'))).rejects.toThrow();
195195
});
196-
test('reports system error occurs during watching', async () => {
196+
// This is a flaky test that sometimes fails to detect file changes. Retrying may help.
197+
test('reports system error occurs during watching', { retry: 5 }, async () => {
197198
const iff = await createIFF({
198199
'tsconfig.json': '{ "cmkOptions": { "enabled": true } }',
199200
'src/a.module.css': '.a_1 { color: red; }',
@@ -238,7 +239,8 @@ describe('runCMKInWatchMode', () => {
238239
expect(loggerSpy.logError).toHaveBeenCalledTimes(3);
239240
});
240241
});
241-
test('reports diagnostics and emits files on changes', async () => {
242+
// This is a flaky test that sometimes fails to detect file changes. Retrying may help.
243+
test('reports diagnostics and emits files on changes', { retry: 5 }, async () => {
242244
const iff = await createIFF({
243245
'tsconfig.json': '{ "cmkOptions": { "enabled": true } }',
244246
'src/a.module.css': '.a_1 { color: red; }',

0 commit comments

Comments
 (0)