UNPKG

1.53 kBJavaScriptView Raw
1// Karma configuration file
2var karma = require('karma');
3
4module.exports = function(karma) {
5 var config = {
6 singleRun: true,
7 autoWatch: false,
8 autoWatchInterval: 0,
9
10 // level of logging
11 // possible values: LOG_DISABLE, LOG_ERROR, LOG_WARN, LOG_INFO, LOG_DEBUG
12 logLevel: 'warn',
13
14 reporters: ['super-dots', 'mocha'],
15 colors: true,
16 mochaReporter: {
17 output: 'minimal',
18 },
19
20 port: 8080,
21
22 // base path, that will be used to resolve files and exclude
23 basePath: '.',
24
25 // Start these browsers, currently available:
26 // Chrome, ChromeCanary, Firefox, Opera, Safari, PhantomJS
27 browsers: ['ChromeHeadlessNoSandbox'],
28 customLaunchers: {
29 ChromeHeadlessNoSandbox: { base: 'ChromeHeadless', flags: ['--no-sandbox'] },
30 },
31
32 frameworks: ['jasmine'],
33
34 plugins: [
35 require('karma-webpack'),
36 require('karma-sourcemap-loader'),
37 require('karma-super-dots-reporter'),
38 require('karma-mocha-reporter'),
39 require('karma-jasmine'),
40 require('karma-chrome-launcher'),
41 ],
42
43 webpack: {
44 mode: 'development',
45 devtool: 'inline-source-map',
46
47 resolve: {
48 extensions: ['.js', '.ts'],
49 },
50
51 module: {
52 rules: [{ test: /\.ts$/, loader: 'ts-loader?configFile=test/tsconfig.json' }],
53 },
54 },
55
56 webpackMiddleware: {
57 stats: 'minimal',
58 },
59
60 files: ['test/index.js'],
61
62 preprocessors: {
63 'test/index.js': ['webpack', 'sourcemap'],
64 },
65 };
66
67 karma.set(config);
68};