UNPKG

1.88 kBJavaScriptView Raw
1// Karma configuration
2
3module.exports = function(config) {
4 config.set({
5
6 // base path that will be used to resolve all patterns (eg. files, exclude)
7 basePath: '',
8
9
10 // frameworks to use
11 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
12 frameworks: ['jasmine-jquery', 'jasmine'],
13
14
15 // list of files / patterns to load in the browser
16 files: [
17 'test/*.js',
18 'https://code.jquery.com/jquery-3.4.1.min.js',
19 'src/js/*.js',
20 {
21 pattern: 'test/*.html',
22 watched: true,
23 served: true,
24 included: false
25 }
26 ],
27
28
29 // list of files to exclude
30 exclude: [
31 ],
32
33
34 // preprocess matching files before serving them to the browser
35 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
36 preprocessors: {
37 },
38
39
40 // test results reporter to use
41 // possible values: 'dots', 'progress'
42 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
43 reporters: ['spec'],
44
45
46 // web server port
47 port: 9876,
48
49
50 // enable / disable colors in the output (reporters and logs)
51 colors: true,
52
53
54 // level of logging
55 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
56 logLevel: config.LOG_INFO,
57
58
59 // enable / disable watching file and executing tests whenever any file changes
60 autoWatch: false,
61
62
63 // start these browsers
64 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
65 browsers: ['ChromeHeadless'], // 'PhantomJS' 'Chrome', 'Chrome_without_security'
66
67 // Continuous Integration mode
68 // if true, Karma captures browsers, runs the tests and exits
69 singleRun: true,
70
71 // Concurrency level
72 // how many browser should be started simultaneous
73 concurrency: Infinity
74 })
75}