diff options
Diffstat (limited to 'tools/node_modules/expresso/test/match.test.js')
-rw-r--r-- | tools/node_modules/expresso/test/match.test.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/node_modules/expresso/test/match.test.js b/tools/node_modules/expresso/test/match.test.js new file mode 100644 index 0000000..c81cb30 --- /dev/null +++ b/tools/node_modules/expresso/test/match.test.js @@ -0,0 +1,25 @@ +var assert = require('assert'); +var spawn = require('child_process').spawn; + +module.exports = { + 'will run only matched tests': function() { + var proc = spawn('bin/expresso', ['-m', 'p..s', 'test/match/test.js']); + proc.on('exit', function(code) { + completed = true; + assert.equal(0, code, 'failing test was not filtered out'); + }); + setTimeout(function() { + proc.kill('SIGINT'); + }, 1000); + }, + 'will run tests matched in a subsequent expression': function() { + var proc = spawn('bin/expresso', ['-m', 'nothing', '--match', 'p..s', 'test/match/test.js']); + proc.on('exit', function(code) { + completed = true; + assert.equal(0, code, 'failing test was not filtered out'); + }); + setTimeout(function() { + proc.kill('SIGINT'); + }, 1000); + }, +};
\ No newline at end of file |