Thu, 15 Jan 2015 21:13:52 +0100
Remove forgotten relic of ABI crash risk averse overloaded method change.
1 function test () {
2 let loader = makeLoader();
3 let module = Module("./main", gTestPath);
4 let require = Require(loader, module);
6 try {
7 let Model = require("./cant-find-me");
8 ok(false, "requiring a JS module that doesn't exist should throw");
9 }
10 catch (e) {
11 ok(e, "requiring a JS module that doesn't exist should throw");
12 }
15 /*
16 * Relative resource:// URI of JS
17 */
19 let { square } = require("./math");
20 is(square(5), 25, "loads relative URI of JS");
22 /*
23 * Absolute resource:// URI of JS
24 */
26 let { has } = require("resource://gre/modules/commonjs/sdk/util/array");
27 let testArray = ['rock', 'paper', 'scissors'];
29 ok(has(testArray, 'rock'), "loads absolute resource:// URI of JS");
30 ok(!has(testArray, 'dragon'), "loads absolute resource:// URI of JS");
32 finish();
33 }