-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.jezebel
40 lines (36 loc) · 806 Bytes
/
.jezebel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var utils = require('./lib/jezebel/utils');
var stats;
var context;
function reloadModule(path) {
delete require.cache[path];
context.$$ = require(path);
}
exports.settings = {
onStart: function(replSession) {
context = replSession.context;
stats = {
passes: 0,
fails: 0,
changes: 0
};
},
onPass: function() {
stats.passes += 1;
},
onFail: function() {
stats.fails += 1;
},
onChange: function(path) {
stats.changes += 1;
// Broken in Node 0.6 :-(
//if (path.match(/.*\.js$/)) {
// // load the most recently changed module into the $$ variable in the REPL
// reloadModule(path);
//}
}
};
// Run me from the REPL to see your test stats!
exports.stats = function() {
return stats;
}
exports.files = utils.projectFiles;