Skip to content

Commit a135c49

Browse files
committed
test_runner: use exports in coverage mock fixture
Replace the deprecated `namedExports` option in the coverage-with-mock-cjs output fixture with `exports`. The old fixture started emitting a deprecation warning, which changed stderr and broke the TAP snapshot for the coverage output test. Using `exports` keeps the fixture behavior the same while avoiding unrelated warning noise.
1 parent aab63a5 commit a135c49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/fixtures/test-runner/output/coverage-with-mock-cjs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { mock, test } from 'node:test';
22

33
const dependency = mock.fn(() => 'mock-return-value');
4-
mock.module('../coverage-with-mock/dependency.cjs', { namedExports: { dependency } });
4+
mock.module('../coverage-with-mock/dependency.cjs', { exports: { dependency } });
55

66
const { subject } = await import('../coverage-with-mock/subject.mjs');
77

0 commit comments

Comments
 (0)