-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathkarma.conf.js
57 lines (57 loc) · 2.25 KB
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* Karma configuration, field descriptions can be found at
* http://karma-runner.github.io/2.0/config/configuration-file.html
*/
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine-ajax', 'jasmine'],
// Automatically run tests for files matching these regex.
files: [
// ----------------- Third Party Dependencies ----------------------------
// Dependencies must be listed before the file they are used in for
// the googmodule preprocessor to function properly.
{pattern: 'node_modules/google-closure-library/closure/goog/base.js'},
// Listing the files explicitly so they are processed in the right order.
{pattern: 'data-layer-helper/src/logging.js'},
{pattern: 'data-layer-helper/src/plain/plain.js'},
{pattern: 'data-layer-helper/src/helper/utils.js'},
{pattern: 'data-layer-helper/src/helper/data-layer-helper.js'},
// ------------------------ Source Files ---------------------------------
{pattern: 'src/logging.js'},
{pattern: 'src/storage/**.js'},
{pattern: 'src/eventProcessor/EventProcessorInterface.js'},
{pattern: 'src/eventProcessor/generateUniqueId.js'},
{pattern: 'src/eventProcessor/GoogleAnalyticsEventProcessor.js'},
{pattern: 'src/config/configProcessors.js'},
{pattern: 'src/config/setup.js'},
{pattern: 'src/main.js'},
// ------------------------- Test Files ----------------------------------
'test/unit/mocks.js',
'test/unit/**/*_test.js',
],
preprocessors: {'**/*.js': ['googmodule']},
plugins: [
require('karma-jasmine'),
require('karma-jasmine-ajax'),
require('karma-detect-browsers'),
require('karma-chrome-launcher'),
require('karma-firefox-launcher'),
require('karma-ie-launcher'),
require('karma-safari-launcher'),
require('karma-spec-reporter'),
require('karma-jasmine-html-reporter'),
require('karma-googmodule-preprocessor'),
],
reporters: ['spec', 'kjhtml'],
port: 9876,
colors: true,
// Run tests when a file changes.
autoWatch: true,
browsers: ['Chrome'],
client: {
clearContext: false,
},
// If you close the browser, it will not pop up again.
retryLimit: 0,
});
};