diff --git a/cli/commands/protect/wizard.js b/cli/commands/protect/wizard.js index 86e5f3f95f..030a46bea4 100644 --- a/cli/commands/protect/wizard.js +++ b/cli/commands/protect/wizard.js @@ -270,7 +270,7 @@ function processAnswers(answers, policy, options) { } var test = pkg.scripts.test; - var cmd = 'snyk test'; + var cmd = 'snyk test --dev'; if (test && test !== 'echo "Error: no test specified" && exit 1') { // only add the test if it's not already in the test if (test.indexOf(cmd) === -1) { diff --git a/test/fixtures/pkg-mean-io/package.json b/test/fixtures/pkg-mean-io/package.json index 5f40c3ca25..5c28b274c1 100644 --- a/test/fixtures/pkg-mean-io/package.json +++ b/test/fixtures/pkg-mean-io/package.json @@ -15,7 +15,7 @@ "start": "node server", "mocha": "node tools/test/run-mocha.js", "karma": "node node_modules/karma/bin/karma start karma.conf.js", - "test": "snyk test && gulp test", + "test": "snyk test --dev && gulp test", "test-e2e": "gulp e2e.test", "postinstall": "node tools/scripts/postinstall.js", "snyk-protect": "snyk protect", @@ -99,4 +99,4 @@ "through": "latest" }, "snyk": true -} \ No newline at end of file +} diff --git a/test/wizard-process-answers.test.js b/test/wizard-process-answers.test.js index 907a6779e8..70d53dbc19 100644 --- a/test/wizard-process-answers.test.js +++ b/test/wizard-process-answers.test.js @@ -133,7 +133,7 @@ test('wizard replaces npm\s default scripts.test', function (t) { }).then(function () { t.equal(writeSpy.callCount, 1, 'package was written to'); var pkg = JSON.parse(writeSpy.args[0][1]); - t.equal(pkg.scripts.test, 'snyk test', 'default npm exit 1 was replaced'); + t.equal(pkg.scripts.test, 'snyk test --dev', 'default npm exit 1 was replaced'); }).catch(t.threw).then(function () { process.chdir(old); t.end(); @@ -153,7 +153,7 @@ test('wizard replaces prepends to scripts.test', function (t) { }).then(function () { t.equal(writeSpy.callCount, 1, 'package was written to'); var pkg = JSON.parse(writeSpy.args[0][1]); - t.equal(pkg.scripts.test, 'snyk test && ' + prevPkg.scripts.test, 'prepended to test script'); + t.equal(pkg.scripts.test, 'snyk test --dev && ' + prevPkg.scripts.test, 'prepended to test script'); }).catch(t.threw).then(function () { process.chdir(old); t.end(); @@ -178,4 +178,4 @@ test('wizard detects existing snyk in scripts.test', function (t) { process.chdir(old); t.end(); }); -}); \ No newline at end of file +});