Skip to content

Commit d20bf45

Browse files
committed
test(fmt): preserve extensionless cache coverage
1 parent 6de9887 commit d20bf45

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

packages/rstack/tests/fmt/runnerWorkerPreflight.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@ test('does not start the worker pool when every parser result is cached as unsup
6868
});
6969
});
7070

71-
test('does not start the worker pool when only one file remains pending', async () => {
71+
test('rechecks a path-only unsupported entry on the main thread', async () => {
7272
await withTempProject(async (rootPath) => {
7373
const { cache, file } = await createCachedUnsupportedFile(
7474
rootPath,
7575
'script',
7676
);
77+
writeProjectFile(rootPath, 'script', '#!/usr/bin/env node\nconst value=1');
7778

7879
await expect(
7980
runFmtFiles({
@@ -82,9 +83,9 @@ test('does not start the worker pool when only one file remains pending', async
8283
cache,
8384
}),
8485
).resolves.toEqual({
85-
exitCode: 2,
86-
files: [],
87-
processedFileCount: 0,
86+
exitCode: 1,
87+
files: [{ path: file.path, status: 'different' }],
88+
processedFileCount: 1,
8889
});
8990
expect(mocks.workerPoolCalls).toEqual([]);
9091
});

0 commit comments

Comments
 (0)