Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
simplify '--test' flag evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Zeug committed Mar 16, 2017
1 parent 244a6e9 commit b87a9e0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ const cmp = require('semver-compare');
const parseJson = require('xml2js').parseString;

const options = minimist(process.argv.slice(2), {
string: ['platform', 'walletSource'],
string: ['platform', 'walletSource', 'test'],
default: {
platform: 'all',
walletSource: 'master',
test: 'basic',
},
});

Expand Down Expand Up @@ -548,12 +549,9 @@ gulp.task('build-nsis', (cb) => {


const testApp = (app) => {
// gulp test-mist --test=[FILENAME]
const testNameSearch = process.argv.filter(function(e){ return /^--test=/.test(e) });
const testFileName = (testNameSearch.length > 0)? testNameSearch[0].replace(/^--test=/, '') : 'basic';

// gulp test-mist [--test TESTFILEPREFIX]
return gulp.src([
`./tests/${app}/${testFileName}.test.js`,
`./tests/${app}/${options.test}.test.js`,
]).pipe(mocha({
timeout: 60000,
ui: 'exports',
Expand Down

0 comments on commit b87a9e0

Please sign in to comment.