Skip to content

Commit

Permalink
Defaults files to ['test']
Browse files Browse the repository at this point in the history
  • Loading branch information
fritx committed May 2, 2014
1 parent ae9bdba commit ee72aa3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ using `sudo make install`. Example usage:

nodeunit testmodule1.js testfolder [...]

If no entry file specified, `test` defaults.

The default test reporter uses color output, because I think that's more fun :) I
intend to add a no-color option in future. To give you a feeling of the fun you'll
be having writing tests, lets fix the example at the start of the README:
Expand Down
5 changes: 2 additions & 3 deletions bin/nodeunit
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ args.forEach(function (arg) {
}
});

// defaults to `test`
if (files.length === 0) {
console.log('Files required.');
console.log(usage);
process.exit(1);
files = ['test'];
}

if (config_file) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@
"tap": ">=0.2.3"
},
"scripts": {
"test": "node ./bin/nodeunit test"
"test": "node ./bin/nodeunit"
}
}

0 comments on commit ee72aa3

Please sign in to comment.