Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"scripts": {
"build": "tsc",
"test": "npm run build && node scripts/run-tests.mjs",
"test:coverage": "npm run build && node --test --experimental-test-coverage --test-coverage-lines=98 --test-coverage-branches=93 --test-coverage-functions=97 test/*.test.js",
"test:coverage": "npm run build && node scripts/run-tests.mjs",
"prepublishOnly": "npm run build"
},
"keywords": [
Expand Down
6 changes: 6 additions & 0 deletions test/run-tests-runner.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ test('CONTRIBUTING.md documents the thresholds COVERAGE_FLAGS actually enforce',
assert.match(doc, new RegExp(`lines ${pct('lines')}, branches ${pct('branches')}, functions ${pct('functions')}`));
});

test('test:coverage delegates to the shared runner without inline coverage flags', () => {
const { scripts } = JSON.parse(readFileSync(join(process.cwd(), 'package.json'), 'utf-8'));
assert.equal(scripts['test:coverage'], 'npm run build && node scripts/run-tests.mjs');
assert.doesNotMatch(scripts['test:coverage'], /--(?:experimental-test-coverage|test-coverage-)/);
});

test('listTestFiles returns only sorted *.test.js entries', () => {
const dir = mkdtempSync(join(tmpdir(), 'pluk-run-tests-'));
try {
Expand Down
Loading