1 | const nodeResolve = require('rollup-plugin-node-resolve');
|
2 | const commonjs = require('rollup-plugin-commonjs');
|
3 | const async = require('rollup-plugin-async');
|
4 |
|
5 | module.exports = function(karma) {
|
6 | const config = {
|
7 | singleRun: true,
|
8 | autoWatch: false,
|
9 | autoWatchInterval: 0,
|
10 | logLevel: 'warn',
|
11 | reporters: ['super-dots', 'mocha'],
|
12 | mochaReporter: {
|
13 | output: 'minimal',
|
14 | },
|
15 | colors: true,
|
16 | port: 8080,
|
17 | basePath: '.',
|
18 | browsers: [process.env.TRAVIS ? 'ChromeHeadlessNoSandbox' : 'Chrome'],
|
19 | customLaunchers: {
|
20 | ChromeHeadlessNoSandbox: { base: 'ChromeHeadless', flags: ['--no-sandbox'] },
|
21 | },
|
22 |
|
23 | frameworks: ['jasmine'],
|
24 |
|
25 | files: [{ pattern: 'test/**/*.js', watched: false }],
|
26 |
|
27 | preprocessors: {
|
28 | 'test/**/*.js': ['rollup'],
|
29 | },
|
30 |
|
31 | rollupPreprocessor: {
|
32 | plugins: [nodeResolve({ jsnext: true }), commonjs(), async()],
|
33 | output: {
|
34 | format: 'iife',
|
35 | },
|
36 | },
|
37 | };
|
38 |
|
39 | karma.set(config);
|
40 | };
|