forked from requirejs/requirejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall-server.js
More file actions
83 lines (59 loc) · 1.92 KB
/
all-server.js
File metadata and controls
83 lines (59 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/**
* @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
/**
* Use the r.js script to run these tests. Be sure require.js is updated
* in that script.
*/
/*jslint strict: false, evil: true */
/*global Packages: false, process: false, require: true, define: true, doh: false */
//A hack to doh to avoid dojo setup stuff in doh/runner.js
var skipDohSetup = true,
fs, vm, load, env;
//requirejsVars = {};
(function () {
if (typeof Packages !== 'undefined') {
env = 'rhino';
} else if (typeof process !== 'undefined') {
env = 'node';
fs = require('fs');
vm = require('vm');
load = function (path) {
return vm.runInThisContext(require.makeNodeWrapper(fs.readFileSync(path, 'utf8'), path));
};
}
}());
//Load the tests.
load("doh/runner.js");
load('doh/_' + env + 'Runner.js');
load("simple-tests.js");
delete requirejs.s.contexts._
load("circular-tests.js");
delete requirejs.s.contexts._
load("relative/relative-tests.js");
delete requirejs.s.contexts._
load("relative/relativeBaseUrl-tests.js");
delete requirejs.s.contexts._
load("exports/exports-tests.js");
delete requirejs.s.contexts._
load("exports/moduleAndExports-tests.js");
delete requirejs.s.contexts._
load("anon/anon-tests.js");
delete requirejs.s.contexts._
load("packages/packages-tests.js");
delete requirejs.s.contexts._
load("plugins/sync-tests.js");
delete requirejs.s.contexts._
load("plugins/fromText/fromText-tests.js");
delete requirejs.s.contexts._
load("plugins/textDepend/textDepend-tests.js");
delete requirejs.s.contexts._
load("universal/universal-tests.js");
delete requirejs.s.contexts._
load("defineError/defineError-tests.js");
delete requirejs.s.contexts._
load("circular/circularPlugin-tests.js");
//Print out the final report
doh.run();