forked from ivmartel/dwv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
70 lines (69 loc) · 2.49 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
// 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-xhr-backend/i18nextXHRBackend.min.js', watched: false},
{pattern: 'node_modules/i18next-browser-languagedetector/i18nextBrowserLanguageDetector.min.js', watched: false},
{pattern: 'node_modules/jszip/dist/jszip.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: 'decoders/**/*.js', included: false},
{pattern: 'tests/visual/images/*.jpg', included: false},
{pattern: 'tests/pacs/images/*.png', included: false},
// src
'src/**/*.js',
// test
'tests/**/*.test.js',
'tests/utils/worker.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' }
]
},
reporters: ['progress'],
logLevel: config.LOG_INFO,
browsers: ['Chrome'],
restartOnFileChange: true
});
};