diff options
author | Rebecca Turner <me@re-becca.org> | 2015-06-25 23:42:00 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-06-26 03:27:36 +0300 |
commit | a30644689e69c1eee48ac1f0cd1d6505d6d7c477 (patch) | |
tree | d0c62dd6eec75c7dd60f368e26825b7b90b65b62 | |
parent | 6aa6754deb2908f5f5f0fb914557fa9365e44991 (diff) |
test: more descriptive assertions + assertion label
-rw-r--r-- | test/tap/noargs-install-config-save.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/tap/noargs-install-config-save.js b/test/tap/noargs-install-config-save.js index 81b23cca9..30d13904e 100644 --- a/test/tap/noargs-install-config-save.js +++ b/test/tap/noargs-install-config-save.js @@ -58,7 +58,7 @@ test('does not update the package.json with empty arguments', function (t) { child.on('close', function () { var text = JSON.stringify(fs.readFileSync(pkg + '/package.json', 'utf8')) s.close() - t.ok(text.indexOf('"dependencies') === -1) + t.equal(text.indexOf('"dependencies'), -1, 'dependencies do not exist in file') }) }) }) @@ -71,8 +71,8 @@ test('updates the package.json (adds dependencies) with an argument', function ( var child = createChild([npm, 'install', 'underscore']) child.on('close', function () { s.close() - var text = JSON.stringify(fs.readFileSync(pkg + '/package.json', 'utf8')) - t.ok(text.indexOf('"dependencies') !== -1) + var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8")) + t.notEqual(text.indexOf('"dependencies'), -1, 'dependencies exist in file') }) }) }) |