fix test
This commit is contained in:
parent
be4cfac1af
commit
b274295e90
|
@ -7,6 +7,7 @@ var fs = require('fs');
|
||||||
|
|
||||||
if (!fsname || '--help' === fs || '-h' === fs) {
|
if (!fsname || '--help' === fs || '-h' === fs) {
|
||||||
console.error('Usage: hexdump.js <filepath>');
|
console.error('Usage: hexdump.js <filepath>');
|
||||||
|
process.exit(2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +15,7 @@ try {
|
||||||
fs.statSync(fsname);
|
fs.statSync(fsname);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error(e.message);
|
console.error(e.message);
|
||||||
|
process.exit(3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"description": "Like hexdump on *nix, but in JavaScript.",
|
"description": "Like hexdump on *nix, but in JavaScript.",
|
||||||
"main": "hexdump.js",
|
"main": "hexdump.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "node bin/cli.js hexdump.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Loading…
Reference in New Issue