This repository has been archived by the owner on Dec 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathkarma.conf.js
65 lines (63 loc) · 1.78 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
const UNBUNDLED = {
frameworks: ['mocha', 'sinon-chai'], // no riot
files: [
'node_modules/moment/min/moment.min.js',
'node_modules/commonmark/dist/commonmark.min.js',
'node_modules/chart.js/Chart.min.js',
'node_modules/ace-builds/src-min-noconflict/ace.js',
'node_modules/jquery/dist/jquery.min.js',
'node_modules/credit-card-type/dist/js/app.built.min.js',
'dependencies/js/iframify.js',
`dependencies/js/riot+compiler-${process.env.RIOT_VERSION}.min.js`,
'css.js',
'demo/_charts.js',
'test-helpers.js',
'dist/rg.min.js', // use compiled RiotGear
'tags/**/*.spec.js', // no tags, only tests
{ pattern: 'demo/inc.html', watched: false, included: false, served: true, nocache: false }
],
}
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'sinon-chai', 'riot'],
files: [
'node_modules/moment/min/moment.min.js',
'node_modules/commonmark/dist/commonmark.min.js',
'node_modules/chart.js/Chart.min.js',
'node_modules/ace-builds/src-min-noconflict/ace.js',
'node_modules/jquery/dist/jquery.min.js',
'node_modules/credit-card-type/dist/js/app.built.min.js',
'dependencies/js/iframify.js',
'css.js',
'demo/_charts.js',
'test-helpers.js',
'tags/**/*',
{ pattern: 'demo/inc.html', watched: false, included: false, served: true, nocache: false }
],
preprocessors: {
'tags/**/*.spec.js': ['babel'],
'tags/**/*.tag': ['riot', 'coverage']
},
riotPreprocessor: {
options: {
type: 'es6'
}
},
logLevel: config.LOG_ERROR,
reporters: ['mocha', 'coverage'],
coverageReporter: {
reporters: [{
type: 'html',
dir: 'coverage/'
}, {
type: 'text-summary'
}],
},
browsers: ['ChromeHeadless'],
singleRun: true
})
if (process.env.RIOT_VERSION) {
config.set(UNBUNDLED)
}
}