Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use `--forbid-only in CI #3591

Merged
merged 1 commit into from
Nov 29, 2018
Merged
Changes from all 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
9 changes: 6 additions & 3 deletions package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const path = require('path');
function test(testName, mochaParams) {
const coverageCommand = `nyc --no-clean --report-dir coverage/reports/${testName}`;
const mochaCommand = `node ${path.join('bin', 'mocha')}`; // Include 'node' and path.join for Windows compatibility
if (process.env.CI && !/^only-/.test(testName)) {
mochaParams += ' --forbid-only';
}
return `${
process.env.COVERAGE ? coverageCommand : ''
} ${mochaCommand} ${mochaParams}`.trim();
Expand Down Expand Up @@ -196,23 +199,23 @@ module.exports = {
},
globalBdd: {
script: test(
'global-only-bdd',
'only-global-bdd',
'--ui bdd test/only/global/bdd.spec'
),
description: 'Run Node.js "global only" w/ BDD interface tests',
hiddenFromHelp: true
},
globalTdd: {
script: test(
'global-only-tdd',
'only-global-tdd',
'--ui tdd test/only/global/tdd.spec'
),
description: 'Run Node.js "global only" w/ TDD interface tests',
hiddenFromHelp: true
},
globalQunit: {
script: test(
'global-only-qunit',
'only-global-qunit',
'--ui qunit test/only/global/qunit.spec'
),
description: 'Run Node.js "global only" w/ QUnit interface tests',
Expand Down