forked from ivmartel/dwv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
104 lines (103 loc) · 3.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
100
101
102
103
104
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '.',
frameworks: ['qunit'],
plugins: [
require('karma-qunit'),
require('karma-chrome-launcher'),
require('karma-coverage')
],
files: [
// dependencies
{pattern: 'node_modules/konva/konva.min.js', watched: false},
{pattern: 'node_modules/i18next/i18next.min.js', watched: false},
{
pattern: 'node_modules/i18next-http-backend/i18nextHttpBackend.min.js',
watched: false
},
{
pattern: 'node_modules/i18next-browser-languagedetector/' +
'i18nextBrowserLanguageDetector.min.js',
watched: false
},
{pattern: 'node_modules/jszip/dist/jszip.min.js', watched: false},
// benchmark
{pattern: 'node_modules/lodash/lodash.min.js', watched: false},
{pattern: 'node_modules/benchmark/benchmark.js', watched: false},
// test data
{pattern: 'locales/**/translation.json', included: false, type: 'js'},
{pattern: 'tests/data/**/*.dcm', included: false},
{pattern: 'tests/data/DICOMDIR', included: false},
{pattern: 'tests/data/*.dcmdir', included: false},
{pattern: 'tests/data/*.zip', included: false},
{pattern: 'tests/dicom/*.json', included: false},
{pattern: 'tests/state/**/*.json', included: false},
// extra served content
{pattern: 'tests/**/*.html', included: false},
{pattern: 'tests/visual/appgui.js', included: false},
{pattern: 'tests/visual/style.css', included: false},
{pattern: 'tests/dicom/pages/*.js', included: false},
{pattern: 'tests/image/pages/*.js', included: false},
{pattern: 'tests/pacs/*.js', included: false},
{pattern: 'tests/bench/*.js', included: false},
{pattern: 'decoders/**/*.js', included: false},
{pattern: 'tests/utils/worker.js', included: false},
{pattern: 'tests/visual/images/*.jpg', included: false},
{pattern: 'tests/pacs/images/*.png', included: false},
{pattern: 'dist/*.js', included: false},
{pattern: 'build/dist/*.js', included: false},
// src
'src/**/*.js',
// test
'tests/**/*.test.js',
'tests/dicom/*.js'
],
proxies: {
'/locales/': '/base/locales/',
'/tests/data/': '/base/tests/data/',
'/tests/dicom/': '/base/tests/dicom/',
'/tests/state/': '/base/tests/state/',
'/tests/utils/': '/base/tests/utils/'
},
client: {
clearContext: false,
qunit: {
showUI: true,
testTimeout: 5000
}
},
preprocessors: {
'src/**/*.js': ['coverage']
},
coverageReporter: {
dir: require('path').join(__dirname, './build/coverage/dwv'),
reporters: [
{type: 'html', subdir: 'report-html'},
{type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt'},
{type: 'text-summary'}
],
check: {
global: {
statements: 40,
branches: 40,
functions: 30,
lines: 40
}
}
},
reporters: ['progress'],
logLevel: config.LOG_INFO,
customLaunchers: {
ChromeWithTestsPage: {
base: 'Chrome',
flags: [
'http://localhost:9876/base/tests/index.html'
]
}
},
browsers: ['ChromeWithTestsPage'],
restartOnFileChange: true
});
};