Skip to content
Browse files

Document regex param, add default regex

  • Loading branch information...
1 parent 5075ae9 commit 2a6d0e3a61002fed541e3f69da83c132f3a8066e @felixge committed
Showing with 13 additions and 4 deletions.
  1. +10 −3 Readme.md
  2. +2 −0 index.js
  3. +1 −1 test/run.js
View
13 Readme.md
@@ -20,11 +20,18 @@ npm install urun
In order to execute all test-*.js files inside a given directory, simply do:
```js
-require('urun')(__dirname, /test-.+\.js$/);
+require('urun')(__dirname);
```
-You now get a nice progress indication, but that's it. There are no more
-features.
+You now get a nice progress indication, as well as detailed output for each
+test that fails.
+
+The only other feature is specifying a regex for the files to run (default is
+`/test-.+\.js$/`), for example:
+
+```js
+require('urun')(__dirname, /.+Test\.js$/);
+```
## License
View
2 index.js
@@ -4,6 +4,8 @@ var Runner = require('./lib/Runner');
var BashReporter = require('./lib/reporter/BashReporter');
module.exports = function(dir, include) {
+ include = include || /test-.+\.js$/;
+
var finder = new FileFinder(dir);
var filter = new FileFilter({include: include});
View
2 test/run.js
@@ -1 +1 @@
-require('..')(__dirname, /test-.+\.js$/);
+require('..')(__dirname);

0 comments on commit 2a6d0e3

Please sign in to comment.
Something went wrong with that request. Please try again.