UNPKG

1.96 kBJavaScriptView Raw
1// Karma configuration
2// Generated on Fri Oct 30 2015 22:10:10 GMT+0900 (JST)
3
4module.exports = function(config) {
5 config.set({
6
7 // base path that will be used to resolve all patterns (eg. files, exclude)
8 basePath: '',
9
10
11 // frameworks to use
12 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13 frameworks: ['jasmine'],
14
15
16 // list of files / patterns to load in the browser
17 files: [
18 'node_modules/@babel/polyfill/dist/polyfill.js',
19 'test/*.js'
20 ],
21
22
23 // list of files to exclude
24 exclude: [
25 ],
26
27
28 plugins: [
29 'karma-jasmine',
30 'karma-phantomjs-launcher',
31 require('./lib')
32 ],
33
34
35 // preprocess matching files before serving them to the browser
36 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
37 preprocessors: {
38 'test/**/*.js': 'babel'
39 },
40
41
42 babelPreprocessor: {
43 options: {
44 presets: ['@babel/preset-env']
45 }
46 },
47
48
49 // test results reporter to use
50 // possible values: 'dots', 'progress'
51 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
52 reporters: ['progress'],
53
54
55 // web server port
56 port: 9876,
57
58
59 // enable / disable colors in the output (reporters and logs)
60 colors: true,
61
62
63 // level of logging
64 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
65 logLevel: config.LOG_INFO,
66
67
68 // enable / disable watching file and executing tests whenever any file changes
69 autoWatch: true,
70
71
72 // start these browsers
73 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
74 browsers: ['PhantomJS'],
75
76
77 // Continuous Integration mode
78 // if true, Karma captures browsers, runs the tests and exits
79 singleRun: true,
80
81 // Concurrency level
82 // how many browser should be started simultanous
83 concurrency: Infinity
84 })
85}