UNPKG

2.29 kBJavaScriptView Raw
1module.exports = function (karma) {
2 return {
3 basePath: '..',
4
5 // frameworks to use
6 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
7 frameworks: ['jasmine', 'chai', 'sinon'],
8
9 // enable / disable watching file and executing tests whenever any file changes
10 autoWatch: false,
11
12 // Continuous Integration mode
13 // if true, Karma captures browsers, runs the tests and exits
14 singleRun: true,
15
16 // level of logging
17 // possible values: karma.LOG_DISABLE || karma.LOG_ERROR || karma.LOG_WARN || karma.LOG_INFO || karma.LOG_DEBUG
18 logLevel: karma.LOG_INFO,
19
20 // start these browsers
21 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
22 browsers: ['ChromeNoSandbox'],
23
24 // test results reporter to use
25 // possible values: 'dots', 'progress'
26 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
27 reporters: ['progress'],
28
29 // enable / disable colors in the output (reporters and logs)
30 colors: true,
31
32 port: 2000,
33
34 plugins: [
35 require('karma-jasmine'),
36 require('karma-chai'),
37 require('karma-sinon'),
38 require('karma-chrome-launcher')
39 ],
40
41 customLaunchers: {
42 ChromeNoSandbox: {
43 base: 'Chrome',
44 flags: ['--no-sandbox']
45 }
46 },
47
48 files: [
49 // polyfills
50 { pattern: 'node_modules/es6-shim/es6-shim.js', included: true, watched: false },
51 { pattern: 'node_modules/reflect-metadata/Reflect.js', included: true, watched: false },
52 { pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false },
53 'node_modules/zone.js/dist/zone.js',
54 'node_modules/zone.js/dist/long-stack-trace-zone.js',
55 'node_modules/zone.js/dist/proxy.js',
56 'node_modules/zone.js/dist/sync-test.js',
57 'node_modules/zone.js/dist/jasmine-patch.js',
58 'node_modules/zone.js/dist/async-test.js',
59 'node_modules/zone.js/dist/fake-async-test.js',
60
61 // allow for importing these
62 { pattern: 'node_modules/**/*', included: false, watched: false },
63 { pattern: 'system.config.js', included: false, watched: true },
64
65 // shim to run the unit tests
66 { pattern: 'config/karma-test-shim.js', included: true, watched: true },
67
68 { pattern: 'lib/*', included: false, watched: true }
69 ],
70 };
71};