Skip to content

Commit

Permalink
test: re-test deep policy trust
Browse files Browse the repository at this point in the history
  • Loading branch information
remy authored and Danny Grander committed Aug 4, 2016
1 parent 4b693bf commit 135787e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/policy-trust-deep.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var test = require('tap').test;
var test = require('tap-only');
var Promise = require('es6-promise').Promise; // jshint ignore:line
var cli = require('../cli/commands');
var dir = __dirname + '/fixtures/qs-package';
Expand All @@ -7,15 +7,16 @@ test('`snyk test` sees suggested ignore policies', function (t) {
return cli.test(dir).catch(function (res) {
var vulns = res.message.toLowerCase();
t.notEqual(vulns.indexOf('suggests ignoring this issue, with reason: test trust policies'), -1, 'found suggestion to ignore');
t.equal(count('vulnerability found', vulns), 6, 'all 6 vulns found');

t.equal(count('vulnerability found', vulns), 4, 'all 4 vulns found');
});
});

test('`snyk test` ignores when applying `--trust-policies`', function (t) {
return cli.test(dir, { 'trust-policies': true }).catch(function (res) {
var vulns = res.message.trim();
// note: it's 2 vulns + the summary line
t.equal(count('vulnerability found', vulns), 4, 'only 4 vulns left');
// note: it's 2 vulns
t.equal(count('vulnerability found', vulns), 2, 'only 2 vulns left');
});
});

Expand Down

0 comments on commit 135787e

Please sign in to comment.