Index: test.js |
=================================================================== |
new file mode 100755 |
--- /dev/null |
+++ b/test.js |
@@ -0,0 +1,28 @@ |
+#!/usr/bin/env node --harmony |
+"use strict"; |
+ |
+require("node-babel")({ |
+ extensions: [".js"], |
+ ignore: /\bcompiled\b/, |
+ blacklist: ["useStrict"] |
+}); |
+ |
+// HACK: override Node's module resolution to match the way bootstrap.js |
+// resolves modules right now. |
+let nodeModule = require("module"); |
+let origResolve = nodeModule._resolveFilename; |
+nodeModule._resolveFilename = function() |
+{ |
+ let params = Array.slice(arguments); |
+ if (params[0] == "compiled") |
+ params[0] = "./compiled"; |
+ else if (params[0] == "filterClasses") |
+ params[0] = "./filterClassesNew"; |
+ else if (params[0] == "../lib/filterClasses") |
+ params[0] = "../lib/filterClassesNew"; |
+ else if (params[0] == "filterNotifier") |
+ params[0] = "./filterNotifier"; |
+ return origResolve.apply(this, params); |
+}; |
+ |
+require("nodeunit").reporters.default.run(["test"]); |