Skip to content

Commit

Permalink
Fix for node 0.5.x, remove -I support
Browse files Browse the repository at this point in the history
this means test cov is screwed as well for now...
  • Loading branch information
tj committed Oct 12, 2011
1 parent 4e11d10 commit 6961879
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -6,13 +6,13 @@ DOCS = docs/index.md
HTMLDOCS = $(DOCS:.md=.html)

test: $(BIN)
@./$(BIN) -I lib --growl $(TEST_FLAGS) test/*.test.js
@./$(BIN) --growl $(TEST_FLAGS) test/*.test.js

test-cov:
@./$(BIN) -I lib --cov $(TEST_FLAGS) test/*.test.js

test-serial:
@./$(BIN) --serial -I lib $(TEST_FLAGS) test/serial/*.test.js
@./$(BIN) --serial $(TEST_FLAGS) test/serial/*.test.js

install: install-jscov install-expresso

Expand Down
30 changes: 10 additions & 20 deletions bin/expresso
Expand Up @@ -117,7 +117,6 @@ var usage = ''
+ '\n -t, --timeout MS Timeout in milliseconds, defaults to 2000'
+ '\n -r, --require PATH Require the given module path'
+ '\n -o, --only TESTS Execute only the comma sperated TESTS (can be set several times)'
+ '\n -I, --include PATH Unshift the given path to require.paths'
+ '\n -p, --port NUM Port number for test servers, starts at 5555'
+ '\n -s, --serial Execute tests serially'
+ '\n -b, --boring Suppress ansi-escape colors'
Expand All @@ -143,15 +142,6 @@ while (args.length) {
sys.puts(version);
process.exit(1);
break;
case '-i':
case '-I':
case '--include':
if (arg = args.shift()) {
require.paths.unshift(arg);
} else {
throw new Error('--include requires a path');
}
break;
case '-o':
case '--only':
if (arg = args.shift()) {
Expand Down Expand Up @@ -184,16 +174,16 @@ while (args.length) {
throw new Error('--timeout requires an argument');
}
break;
case '-c':
case '--cov':
case '--coverage':
defer = true;
childProcess.exec('rm -fr lib-cov && node-jscoverage lib lib-cov', function(err){
if (err) throw err;
require.paths.unshift('lib-cov');
run(files);
})
break;
// case '-c':
// case '--cov':
// case '--coverage':
// defer = true;
// childProcess.exec('rm -fr lib-cov && node-jscoverage lib lib-cov', function(err){
// if (err) throw err;
// require.paths.unshift('lib-cov');
// run(files);
// })
// break;
case '-q':
case '--quiet':
quiet = true;
Expand Down
2 changes: 1 addition & 1 deletion test/bar.test.js
Expand Up @@ -4,7 +4,7 @@
*/

var assert = require('assert')
, bar = require('bar');
, bar = require('../lib/bar');

module.exports = {
'bar()': function(){
Expand Down
2 changes: 1 addition & 1 deletion test/foo.test.js
Expand Up @@ -4,7 +4,7 @@
*/

var assert = require('assert')
, foo = require('foo');
, foo = require('../lib/foo');

module.exports = {
'foo()': function(){
Expand Down

0 comments on commit 6961879

Please sign in to comment.