☕️ Classic, reliable, trusted test framework for Node.js and the browser
added watch instrumentation
Tj Holowaychuka72ebc2ffb69
diff --git a/lib/watch.js b/lib/watch.jsindex 3fb325cd..4bc00088 100644--- a/lib/watch.js+++ b/lib/watch.js@@ -3,11 +3,13 @@* Module dependencies.*/-var fs = require('fs');+var fs = require('fs')+ , debug = require('debug')('watch');module.exports = function(paths, fn){var options = { interval: 100 };paths.forEach(function(path){+ debug('watch %s', path);fs.watchFile(path, options, function(curr, prev){if (prev.mtime < curr.mtime) fn(path);});