-
Notifications
You must be signed in to change notification settings - Fork 578
/
Copy pathkarma.conf.js
41 lines (39 loc) · 1.13 KB
/
karma.conf.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
/* eslint-disable @typescript-eslint/no-require-imports */
/* eslint-disable global-require */
process.env.CHROME_BIN = require('puppeteer').executablePath();
const isCiEnv = process.env.ONCI;
module.exports = function (config) {
config.set({
frameworks: ['mocha', 'browserify'],
plugins: [
require('karma-mocha'),
require('karma-browserify'),
require('karma-chrome-launcher'),
require('karma-firefox-launcher'),
require('karma-safari-launcher')
],
browsers: isCiEnv ? ['ChromeHeadless'] : ['Chrome', 'Safari', 'Firefox'],
files: ['test/browser/build/aliyun-oss-sdk.min.js', 'test/browser/build/tests.js'],
// preprocessors: {
// 'dist/aliyun-oss-sdk.js': ['coverage']
// },
// coverageReporter: {
// type: 'html',
// dir: 'coverage-browser/'
// },
// reporters: ['progress', 'coverage'],
reporters: ['progress'],
port: 19876,
colors: true,
logLevel: config.LOG_INFO,
singleRun: true,
browserDisconnectTolerance: 3,
browserNoActivityTimeout: 30000,
concurrency: 1,
client: {
mocha: {
timeout: 15000
}
}
});
};