From b274295e906e45132b0d7e4996ccb1b90454795c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 25 Sep 2017 12:22:44 -0600 Subject: [PATCH] fix test --- bin/cli.js | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/cli.js b/bin/cli.js index 033bf36..3670344 100644 --- a/bin/cli.js +++ b/bin/cli.js @@ -7,6 +7,7 @@ var fs = require('fs'); if (!fsname || '--help' === fs || '-h' === fs) { console.error('Usage: hexdump.js '); + process.exit(2); return; } @@ -14,6 +15,7 @@ try { fs.statSync(fsname); } catch(e) { console.error(e.message); + process.exit(3); return; } diff --git a/package.json b/package.json index c47ca93..628c2aa 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Like hexdump on *nix, but in JavaScript.", "main": "hexdump.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "node bin/cli.js hexdump.js" }, "repository": { "type": "git",