-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main-tests.js
45 lines (37 loc) · 994 Bytes
/
main-tests.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
const { throws, deepEqual } = require('assert');
const mod = require('./main.js');
describe('OLSKTubeLoad', function test_OLSKTubeLoad() {
it('throws if not object', function () {
throws(function () {
mod.OLSKTubeLoad(null);
}, /OLSKErrorInputNotValid/);
});
it('throws if ParamParent not object', function () {
throws(function () {
mod.OLSKTubeLoad(uConfig({
ParamParent: null,
}));
}, /OLSKErrorInputNotValid/);
});
it('throws if ParamPlaylist not string', function () {
throws(function () {
mod.OLSKTubeLoad(uConfig({
ParamPlaylist: true,
}));
}, /OLSKErrorInputNotValid/);
});
it('throws if ParamPlaylist not filled', function () {
throws(function () {
mod.OLSKTubeLoad(uConfig({
ParamPlaylist: ' ',
}));
}, /OLSKErrorInputNotValid/);
});
it('throws if ParamAutoplay not boolean', function () {
throws(function () {
mod.OLSKTubeLoad(uConfig({
ParamAutoplay: 'true',
}));
}, /OLSKErrorInputNotValid/);
});
});