Skip to content

Commit

Permalink
test: update tests with new pkg.start
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Sep 19, 2015
1 parent be3b5b3 commit 12d02b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"scripts": {
"coverage": "istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js",
"lint": "jscs lib/**/*.js -v",
"spec": "node_modules/.bin/mocha --timeout 30000 --ui bdd test/**/*.test.js",
":spec": "node_modules/.bin/mocha --timeout 30000 --ui bdd test/**/*.test.js",
"test": "npm run lint && npm run spec",
":test": "for FILE in test/**/*.test.js; do echo $FILE; ./node_modules/.bin/mocha --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done",
"spec": "for FILE in test/**/*.test.js; do echo $FILE; ./node_modules/.bin/mocha --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done",
"web": "node web",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
Expand Down
15 changes: 2 additions & 13 deletions test/cli/parse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('nodemon CLI parser', function () {
var settings = parse(asCLI('--debug'));
var cmd = commandToString(command(settings));
process.chdir(cwd);
assert(cmd === 'node --debug ./bin/www');
assert.equal(cmd, 'NODE_ENV=development node ./bin/www --debug');
});

it('should replace {{filename}}', function () {
Expand Down Expand Up @@ -117,18 +117,7 @@ describe('nodemon CLI parser', function () {

process.chdir(pwd);

assert(cmd === 'node ./bin/www', 'command is "' + cmd + '"');
});

it('should support package.scripts.start with args', function () {
var pwd = process.cwd();
process.chdir('test/fixtures/packages/browserify'); // allows us to load text/fixtures/package.json
var settings = parse(asCLI('--debug')),
cmd = commandToString(command(settings));

process.chdir(pwd);

assert(cmd === 'browserify --debug "-t hbsfy app.js -o bundle.js"', 'command is "' + cmd + '"');
assert.equal(cmd, 'NODE_ENV=development node ./bin/www', 'command is "' + cmd + '"');
});

it('should support spaces', function () {
Expand Down

0 comments on commit 12d02b5

Please sign in to comment.