mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
test: clean string for trigger check
This commit is contained in:
@@ -153,7 +153,7 @@ describe('nodemon fork child restart', function () {
|
||||
},
|
||||
output: function (data) {
|
||||
var msg = colour.strip(data.trim());
|
||||
if (monitor(msg)) {
|
||||
if (utils.match(msg, 'changes after filters (before/after)')) {
|
||||
var changes = msg.split(/\n/).shift();
|
||||
changes = changes.replace(/\s*/gm, '').slice(-5).split('/');
|
||||
var restartedOn = changes.pop();
|
||||
|
||||
@@ -115,7 +115,14 @@ Plan.prototype.assert = function() {
|
||||
}
|
||||
};
|
||||
|
||||
function getTriggerCount(msg) {
|
||||
var changes = msg.split(/\n/).shift();
|
||||
changes = changes.replace(/\s*/gm, '').slice(-5).split('/');
|
||||
return changes.pop();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getTriggerCount: getTriggerCount,
|
||||
Plan: Plan,
|
||||
asCLI: asCLI,
|
||||
match: match,
|
||||
|
||||
Reference in New Issue
Block a user