forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_spec.js
executable file
·78 lines (60 loc) · 2.68 KB
/
api_spec.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
var assert = require('chai').assert;
var prebid = require('../../src/prebid');
describe('Publisher API', function () {
// var assert = chai.assert;
describe('api of command queue', function () {
it('should have a global variable $$PREBID_GLOBAL$$', function () {
assert.isObject($$PREBID_GLOBAL$$);
});
it('should have a global variable $$PREBID_GLOBAL$$.cmd as an array', function () {
assert.isArray($$PREBID_GLOBAL$$.cmd);
});
it('should have $$PREBID_GLOBAL$$.cmd.push function', function () {
assert.isFunction($$PREBID_GLOBAL$$.cmd.push);
});
it('should have a global variable $$PREBID_GLOBAL$$.que as an array', function () {
assert.isArray($$PREBID_GLOBAL$$.que);
});
it('should have $$PREBID_GLOBAL$$.que.push function', function () {
assert.isFunction($$PREBID_GLOBAL$$.que.push);
});
});
describe('has function', function () {
it('should have function $$PREBID_GLOBAL$$.getAdserverTargeting', function () {
assert.isFunction($$PREBID_GLOBAL$$.getAdserverTargeting);
});
it('should have function $$PREBID_GLOBAL$$.getAdserverTargetingForAdUnitCode', function () {
assert.isFunction($$PREBID_GLOBAL$$.getAdserverTargetingForAdUnitCode);
});
it('should have function $$PREBID_GLOBAL$$.getBidResponses', function () {
assert.isFunction($$PREBID_GLOBAL$$.getBidResponses);
});
it('should have function $$PREBID_GLOBAL$$.getBidResponses', function () {
assert.isFunction($$PREBID_GLOBAL$$.getNoBids);
});
it('should have function $$PREBID_GLOBAL$$.getBidResponsesForAdUnitCode', function () {
assert.isFunction($$PREBID_GLOBAL$$.getBidResponsesForAdUnitCode);
});
it('should have function $$PREBID_GLOBAL$$.setTargetingForGPTAsync', function () {
assert.isFunction($$PREBID_GLOBAL$$.setTargetingForGPTAsync);
});
it('should have function $$PREBID_GLOBAL$$.renderAd', function () {
assert.isFunction($$PREBID_GLOBAL$$.renderAd);
});
it('should have function $$PREBID_GLOBAL$$.removeAdUnit', function () {
assert.isFunction($$PREBID_GLOBAL$$.removeAdUnit);
});
it('should have function $$PREBID_GLOBAL$$.requestBids', function () {
assert.isFunction($$PREBID_GLOBAL$$.requestBids);
});
it('should have function $$PREBID_GLOBAL$$.addAdUnits', function () {
assert.isFunction($$PREBID_GLOBAL$$.addAdUnits);
});
it('should have function $$PREBID_GLOBAL$$.aliasBidder', function () {
assert.isFunction($$PREBID_GLOBAL$$.aliasBidder);
});
it('should have function $$PREBID_GLOBAL$$.getAllWinningBids', function () {
assert.isFunction($$PREBID_GLOBAL$$.getAllWinningBids);
});
});
});