forked from mozilla/popcorn-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopcorn.unit.archaic.js
64 lines (38 loc) · 1.32 KB
/
popcorn.unit.archaic.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
56
57
58
59
60
61
62
63
var methodsString = "removeInstance addInstance getInstanceById removeInstanceById " +
"forEach extend effects error guid sizeOf isArray nop position disable enable destroy" +
"addTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId " +
"timeUpdate plugin removePlugin compose effect xhr getJSONP getScript";
module("Core");
test("Dummy", function () {
expect( 1 );
ok( Popcorn, "Popcorn dummy exists");
});
test("isSupported", function () {
expect( 2 );
ok( "isSupported" in Popcorn, "Popcorn.isSupported boolean flag exists");
ok( !Popcorn.isSupported, "Popcorn.isSupported boolean flag is false");
});
module("Static Methods");
(function() {
var method,
methods = methodsString.split( /\s+/ );
while( methods.length ) {
method = methods.shift();
test( method, function () {
expect( 1 );
ok( Popcorn[ method ], "Popcorn." + method + " exists");
});
}
})( Popcorn );
module("Attempt");
(function() {
var method,
methods = methodsString.split( /\s+/ );
while( methods.length ) {
method = methods.shift();
test( method, function () {
expect( 1 );
equal( Popcorn[ method ](), undefined, "Popcorn." + method + "() dummy returns undefined without throwing exception");
});
}
})( Popcorn );