-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathrunner.js
56 lines (47 loc) · 1.62 KB
/
runner.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
44
45
46
47
48
49
50
51
52
53
54
55
JS.ENV.CWD = (typeof CWD === 'undefined') ? '.' : CWD
JS.cache = false
if (JS.ENV.JS_DEBUG) JS.debug = true
JS.packages(function() { with(this) {
autoload(/^(.*)Spec$/, {from: CWD + '/test/specs', require: ['JS.$1']})
pkg('Test.UnitSpec').requires('JS.Set', 'JS.Observable')
pkg('ClassSpec').requires('ModuleSpec')
file(CWD + '/test/specs/test/test_spec_helpers.js').provides('TestSpecHelpers')
pkg('Test.UnitSpec').requires('TestSpecHelpers')
pkg('Test.MockingSpec').requires('TestSpecHelpers')
}})
JS.require('JS', 'JS.Test', function(js, Test) {
js.extend(JS, js)
JS.Test = Test
var specs = [ 'Test.UnitSpec',
'Test.ContextSpec',
'Test.MockingSpec',
'Test.FakeClockSpec',
'Test.AsyncStepsSpec',
'ModuleSpec',
'ClassSpec',
'MethodSpec',
'KernelSpec',
'SingletonSpec',
'InterfaceSpec',
'CommandSpec',
'ComparableSpec',
'ConsoleSpec',
'ConstantScopeSpec',
'DecoratorSpec',
'EnumerableSpec',
'ForwardableSpec',
'HashSpec',
'LinkedListSpec',
'MethodChainSpec',
'DeferrableSpec',
'ObservableSpec',
'PackageSpec',
'ProxySpec',
'RangeSpec',
'SetSpec',
'StateSpec',
'TSortSpec' ]
specs = Test.filter(specs, 'Spec')
specs.push(function() { Test.autorun() })
JS.require.apply(JS, specs)
})