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: Minor improvements Created Feb. 6, 2016, 8:29 a.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
« no previous file with comments | « lib/filterNotifier.js ('k') | test/domainRestrictions.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"]);
« no previous file with comments | « lib/filterNotifier.js ('k') | test/domainRestrictions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld