forked from sanjeevshrestha/typescript-template-datasource
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
91 lines (83 loc) · 3.05 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
'use strict';
module.exports = function(config) {
config.set({
frameworks: ['systemjs', 'mocha', 'expect', 'sinon'],
files: [
'specs/*specs.ts',
'specs/**/*specs.ts',
'specs/lib/*.ts',
{ pattern: 'src/**/*.ts', included: false },
{ pattern: 'src/css/*.css', included: false },
{ pattern: 'node_modules/grafana-sdk-mocks/**/*.ts', included: false },
{ pattern: 'node_modules/grafana-sdk-mocks/**/*.js', included: false },
{ pattern: 'node_modules/typescript/lib/typescript.js', included: false },
{ pattern: 'node_modules/systemjs-plugin-css/css.js', included: false },
{ pattern: 'node_modules/lodash/lodash.js', included: false },
{ pattern: 'node_modules/moment/moment.js', included: false },
{ pattern: 'node_modules/q/q.js', included: false },
],
systemjs: {
// // SystemJS configuration specifically for tests, added after your config file.
// // Good for adding test libraries and mock modules
config: {
// Set path for third-party libraries as modules
paths: {
'systemjs': 'node_modules/systemjs/dist/system.js',
'system-polyfills': 'node_modules/systemjs/dist/system-polyfills.js',
'lodash': 'node_modules/lodash/lodash.js',
'moment': 'node_modules/moment/moment.js',
'q': 'node_modules/q/q.js',
'typescript': 'node_modules/typescript/lib/typescript.js',
'plugin-typescript': 'node_modules/plugin-typescript/lib/plugin.js',
'css': 'node_modules/systemjs-plugin-css/css.js',
'app/': 'node_modules/grafana-sdk-mocks/app/',
},
map: {
'plugin-typescript': 'node_modules/plugin-typescript/lib/',
css: 'node_modules/systemjs-plugin-css/css.js',
'typescript': 'node_modules/typescript/',
'app/core/utils/kbn': 'node_modules/grafana-sdk-mocks/app/core/utils/kbn.js'
},
packages: {
'plugin-typescript': {
'main': 'plugin.js'
},
'typescript': {
'main': 'lib/typescript.js',
'meta': {
'lib/typescript.js': {
'exports': 'ts'
}
}
},
'app': {
'defaultExtension': 'ts',
'meta': {
'*.js': {
'loader': 'typescript'
}
}
},
'src': {
'defaultExtension': 'ts',
meta: {
'*.css': { loader: 'css' }
}
},
'specs': {
'defaultExtension': 'ts',
'meta': {
'*.js': {
'loader': 'typescript'
}
}
},
},
transpiler: 'plugin-typescript',
}
},
reporters: ['dots'],
logLevel: config.LOG_INFO,
browsers: ['PhantomJS']
});
};