-
Notifications
You must be signed in to change notification settings - Fork 15
/
karma.conf.js
99 lines (96 loc) · 4.42 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
const webpackConfig = require('./webpack.config.js')('prod');
module.exports = function(config) {
config.set({
basePath: './',
files: [
'./designsafe/static/vendor/modernizr/modernizr.js',
'./node_modules/jquery/dist/jquery.min.js',
'./designsafe/static/vendor/bootstrap-ds/js/bootstrap.min.js',
'./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js',
'./node_modules/slick-carousel/slick/**/*.js',
'./node_modules/tv4/tv4.js',
'./node_modules/objectpath/lib/**/*.js',
'./designsafe/static/nbviewer/**/*.js',
'./node_modules/prismjs/prism.js',
'./node_modules/marked/lib/marked.js',
'./node_modules/d3/dist/d3.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js',
'./node_modules/d3plus/d3plus.full.min.js',
'./node_modules/angular/angular.min.js',
'./node_modules/ngstorage/ngStorage.js',
'./node_modules/angular-translate/dist/angular-translate.js',
'./node_modules/angular-aria/angular-aria.js',
'./node_modules/angular-animate/angular-animate.js',
'./node_modules/angular-toastr/dist/angular-toastr.tpls.min.js',
'./node_modules/angular-cookies/angular-cookies.js',
'./node_modules/angular-ui-bootstrap/dist/ui-bootstrap.js',
'./node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js',
'./node_modules/angular-ui-codemirror/src/ui-codemirror.js',
'./node_modules/angular-drag-and-drop-lists/angular-drag-and-drop-lists.js',
'./node_modules/angular-xeditable/dist/js/xeditable.js',
'./node_modules/angular-slick-carousel/dist/angular-slick.min.js',
'./node_modules/angular-material/angular-material.js',
'./designsafe/static/vendor/httpi/build/httpi.min.js',
'./node_modules/angular-ui-router/release/angular-ui-router.js',
'./designsafe/static/vendor/js-custom-select/js/customSelect.js',
'./node_modules/angular-sanitize/angular-sanitize.min.js',
'./node_modules/angular-schema-form/dist/schema-form.js',
'./node_modules/angular-schema-form/dist/bootstrap-decorator.js',
'./designsafe/static/scripts/ng-modernizr/**/*.js',
'./designsafe/static/scripts/ng-designsafe/modules/notifications-module.js',
'./designsafe/static/scripts/logging/logger.js',
'./designsafe/apps/signals/static/designsafe/apps/signals/scripts/module.js',
'./designsafe/static/styles/ng-designsafe.css',
'./designsafe/static/scripts/test-context.js',
],
exclude: [
'./static/admin/**/*.js',
'./static/cascade/**/*.js',
'./static/cms/**/*.js',
'./static/djangocms_text_ckeditor/**/*.js',
],
autoWatch: true,
frameworks: ['jasmine'],
browsers: ['FirefoxHeadless', 'ChromeHeadlessNoSandbox'],
plugins: [
'karma-webpack',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine',
'karma-jasmine-html-reporter',
'karma-coverage',
'karma-spec-reporter',
'karma-sourcemap-loader',
],
preprocessors: {
'./designsafe/static/scripts/**/*.html': ['webpack', 'sourcemap'],
'./designsafe/static/scripts/test-context.js': ['webpack', 'sourcemap', 'coverage'],
'./designsafe/static/scripts/**/*.spec.js': ['webpack', 'sourcemap', 'coverage'],
},
reporters: ['progress', 'coverage', 'spec'],
coverageReporter: {
reporters: [
{type: 'lcov', subdir: '.'},
],
},
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
},
FirefoxHeadless: {
base: 'Firefox',
flags: ['-headless'],
},
},
webpack: {
devtool: webpackConfig.devtool,
resolve: webpackConfig.resolve,
module: webpackConfig.module,
plugins: webpackConfig.plugins,
externals: webpackConfig.externals,
},
browserNoActivityTimeout: 100000,
browserDisconnectTolerance: 2,
});
};