Skip to content

Commit

Permalink
Merge branch 'v6' of github.com:GoogleChrome/workbox into v6
Browse files Browse the repository at this point in the history
  • Loading branch information
tropicadri committed Apr 12, 2021
2 parents 60587f1 + 24e04f4 commit 6d172fe
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions gulp-tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,22 @@ const {parallel, series} = require('gulp');
const {lint} = require('./lint');
const {test_integration} = require('./test-integration');
const {test_node} = require('./test-node');
const logHelper = require('../infra/utils/log-helper');

async function logSkip() {
logHelper.log('Skipping test suite due to --skipTests');
}

function runTestsUnlessSkipped() {
if (global.cliOptions.skipTests) {
return logSkip;
} else {
// The node and integration tests both muck with process.env.NODE_ENV,
// and therefore can't be run in parallel.
return parallel(lint, series(test_node, test_integration));
}
}

module.exports = {
// The node and integration tests both muck with process.env.NODE_ENV, and
// therefore can't be run in parallel.
test: parallel(lint, series(test_node, test_integration)),
test: runTestsUnlessSkipped(),
};

0 comments on commit 6d172fe

Please sign in to comment.