-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunTests.js
43 lines (41 loc) · 1.2 KB
/
runTests.js
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
"use strict"
require.config({
shim:{
"mocha/mocha":{
exports:"mocha"
}
},
packages:[{
name: "mocha",
location: "../node_modules/mocha",
main: "mocha"
},{
name: "domReady",
location: "../node_modules/requirejs-domready",
main: "domReady"
}/*/,{ // This is how you would use it as a dependency (change * to ** to switch).
name: "mochaExport",
location: "node_modules/mocha-exports-amd",
main: "mochaExport"
}]/*/],
paths: {
"mochaExport": "../mochaExport"
}/*//**/
})
require(["mocha",
"mochaExport!withAMDStyle.test",
"mochaExport!withCommonJSStyle.test",
// these tests should be identical in effect;
// the style or absence of shim should not affect
// usage with an actual browser AMD loader
"mochaExport!withAMDStyle.amdefine.test",
"mochaExport!withCommonJSStyle.amdefine.test",
"mochaExport!withAMDStyle.test.noShim",
"mochaExport!withCommonJSStyle.test.noShim",
"domReady!"],
function(mocha) {
if (!mocha) { mocha = self.mocha } // In case shim config were not set up.
// other setup options for mocha here:
//mocha.checkLeaks(true)
mocha.run()
})