Skip to content

Commit

Permalink
test: fix searching for nodemon message
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Sep 19, 2015
1 parent 36a70a5 commit 1ce6de9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/fork/watch-restart.test.js
Expand Up @@ -154,11 +154,9 @@ describe('nodemon fork child restart', function () {
output: function (data) {
var msg = colour.strip(data.trim());
if (monitor(msg)) {
var changes = msg.replace(/\s*/gm, '').slice(-5).split('/');
var changes = msg.split(/\n/).shift();
changes = changes.replace(/\s*/gm, '').slice(-5).split('/');
var restartedOn = changes.pop();
console.log(msg);
console.log(JSON.stringify(changes));
console.log(restartedOn);
assert.equal(restartedOn, '1', 'nodemon restarted on a single file change: ' + restartedOn + ' -- ' + msg);
cleanup(p, done);
}
Expand Down

0 comments on commit 1ce6de9

Please sign in to comment.