Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test.js

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Optimized hash lookup performance a bit Created Feb. 8, 2016, 7:11 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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"]);

Powered by Google App Engine
This is Rietveld