OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env node --harmony |
| 2 "use strict"; |
| 3 |
| 4 require("node-babel")({ |
| 5 extensions: [".js"], |
| 6 ignore: /\bcompiled\b/, |
| 7 blacklist: ["useStrict"] |
| 8 }); |
| 9 |
| 10 // HACK: override Node's module resolution to match the way bootstrap.js |
| 11 // resolves modules right now. |
| 12 let nodeModule = require("module"); |
| 13 let origResolve = nodeModule._resolveFilename; |
| 14 nodeModule._resolveFilename = function() |
| 15 { |
| 16 let params = Array.slice(arguments); |
| 17 if (params[0] == "compiled") |
| 18 params[0] = "./compiled"; |
| 19 else if (params[0] == "filterClasses") |
| 20 params[0] = "./filterClassesNew"; |
| 21 else if (params[0] == "../lib/filterClasses") |
| 22 params[0] = "../lib/filterClassesNew"; |
| 23 else if (params[0] == "filterNotifier") |
| 24 params[0] = "./filterNotifier"; |
| 25 return origResolve.apply(this, params); |
| 26 }; |
| 27 |
| 28 require("nodeunit").reporters.default.run(["test"]); |
OLD | NEW |