all-intercept.js 763 B

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