| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 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 |
|
| 27 |
load("doh/runner.js"); |
| 28 |
load('doh/_' + env + 'Runner.js'); |
| 29 |
|
| 30 |
require("./basic-intercept/basic-tests"); |
| 31 |
|
| 32 |
|
| 33 |
doh.run(); |