Index: test.js |
=================================================================== |
new file mode 100755 |
--- /dev/null |
+++ b/test.js |
@@ -0,0 +1,26 @@ |
+#!/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] == "filterNotifier") |
+ params[0] = "./filterNotifier"; |
+ return origResolve.apply(this, params); |
+}; |
+ |
+require("nodeunit").reporters.default.run(["test"]); |