/
110_several_classes_in_file.t.js
48 lines (27 loc) · 1.98 KB
/
110_several_classes_in_file.t.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
StartTest(function(t) {
JooseX.Namespace.Depended.Manager.my.INC.unshift('localLib/root4')
if (!Joose.is_NodeJS) t.harness.localizeINC(JooseX.Namespace.Depended.Manager.my.INC)
t.plan(8)
//==================================================================================================================================================================================
//t.diag("Testing of loading several classes in a single file")
var async1 = t.beginAsync()
use([ 'BasicTest1' ], function() {
//==================================================================================================================================================================================
t.diag("Testing of loading several classes in a single file")
t.ok(BasicTest1.meta.constructor == Joose.Meta.Class, 'Basic dependencies loading passed #1-1')
t.ok(new BasicTest1().result() == 1, "And it work as expected #1-2")
t.ok(BasicTest2.meta.constructor == Joose.Meta.Class, 'Basic dependencies loading passed #2-1')
t.ok(new BasicTest2().result() == 2, "And it work as expected #2-2")
t.endAsync(async1)
})
var async2 = t.beginAsync()
use([ 'BasicTest3' ], function() {
//==================================================================================================================================================================================
t.diag("Testing of loading several classes in a single file")
t.ok(BasicTest3.meta.constructor == Joose.Meta.Class, 'Basic dependencies loading passed #1-1')
t.ok(new BasicTest3().result() == 3, "And it work as expected #1-2")
t.ok(BasicTest4.meta.constructor == Joose.Meta.Class, 'Basic dependencies loading passed #2-1')
t.ok(new BasicTest4().result() == 4, "And it work as expected #2-2")
t.endAsync(async2)
})
})