forked from webex/webex-js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjasmine.config.js
49 lines (40 loc) · 1002 Bytes
/
jasmine.config.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
const Jasmine = require('jasmine');
const { config, reporter } = require('@webex/jasmine-config');
// eslint-disable-next-line import/no-unresolved
const { Commands } = require('@webex/cli-tools');
const test = {
config: {
name: 'test',
description: 'Perform tests',
options: [
{
description: 'Perform integration tests against the module',
name: 'integration',
},
{
description: 'Remove all reporters',
name: 'silent',
},
],
},
handler: (options) => {
const { integration, silent } = options;
const jasmine = new Jasmine();
const targets = [];
config(jasmine);
jasmine.clearReporters();
if (integration) {
targets.push(
'./test/integration/**/*.test.js',
'./test/integration/**/*.spec.js',
);
}
if (!silent) {
reporter(jasmine);
}
jasmine.execute(targets);
},
};
const commands = new Commands();
commands.mount(test);
commands.process();