Skip to content

Commit ee72aa3

Browse files
committed
Defaults files to ['test']
1 parent ae9bdba commit ee72aa3

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ using `sudo make install`. Example usage:
212212

213213
nodeunit testmodule1.js testfolder [...]
214214

215+
If no entry file specified, `test` defaults.
216+
215217
The default test reporter uses color output, because I think that's more fun :) I
216218
intend to add a no-color option in future. To give you a feeling of the fun you'll
217219
be having writing tests, lets fix the example at the start of the README:

bin/nodeunit

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ args.forEach(function (arg) {
101101
}
102102
});
103103

104+
// defaults to `test`
104105
if (files.length === 0) {
105-
console.log('Files required.');
106-
console.log(usage);
107-
process.exit(1);
106+
files = ['test'];
108107
}
109108

110109
if (config_file) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@
8787
"tap": ">=0.2.3"
8888
},
8989
"scripts": {
90-
"test": "node ./bin/nodeunit test"
90+
"test": "node ./bin/nodeunit"
9191
}
9292
}

0 commit comments

Comments
 (0)