Debian Codegraph @

tests/all-intercept.js

raw symbols SCIP
1 /*jslint strict: false, evil: true */
2 /*global Packages: false, process: false, require: true, define: true, doh: false */
3
4 //A hack to doh to avoid dojo setup stuff in doh/runner.js
5 var skipDohSetup = true,
6 fs, vm, load, env;
7
8 require('../intercept');
9
10 (function () {
11 if (typeof Packages !== 'undefined') {
12 env = 'rhino';
13 } else if (typeof process !== 'undefined') {
14 env = 'node';
15
16 fs = require('fs');
17 vm = require('vm');
18
19 load = function (path) {
20 return vm.runInThisContext(fs.readFileSync(path, 'utf8'), path);
21 };
22 }
23
24 }());
25
26 //Load the tests.
27 load("doh/runner.js");
28 load('doh/_' + env + 'Runner.js');
29
30 require("./basic-intercept/basic-tests");
31
32 //Print out the final report
33 doh.run();