forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma-js.conf.js
63 lines (53 loc) · 1.79 KB
/
karma-js.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
// Karma configuration
// Generated on Thu Sep 25 2014 11:52:02 GMT-0700 (PDT)
var file2moduleName = require('./file2modulename');
module.exports = function(config) {
config.set({
frameworks: ['jasmine'],
files: [
// Sources and specs.
// Loaded through the es6-module-loader, in `test-main.js`.
{pattern: 'modules/**', included: false},
{pattern: 'tools/transpiler/**', included: false},
'node_modules/traceur/bin/traceur-runtime.js',
'traceur-runtime-patch.js',
'node_modules/es6-module-loader/dist/es6-module-loader-sans-promises.src.js',
// Including systemjs because it defines `__eval`, which produces correct stack traces.
'node_modules/systemjs/dist/system.src.js',
'node_modules/systemjs/lib/extension-register.js',
'file2modulename.js',
'test-main.js'
],
preprocessors: {
'modules/**/*.js': ['traceur'],
'modules/**/*.es6': ['traceur'],
'tools/transpiler/**/*.js': ['traceur'],
'tools/transpiler/**/*.es6': ['traceur'],
},
traceurPreprocessor: {
options: {
outputLanguage: 'es5',
sourceMaps: true,
script: false,
memberVariables: true,
modules: 'instantiate',
types: true,
typeAssertions: true,
typeAssertionModule: 'rtts_assert/rtts_assert',
annotations: true
},
resolveModuleName: file2moduleName,
transformPath: function(fileName) {
return fileName.replace(/\.es6$/, '.js');
}
},
customLaunchers: {
DartiumWithWebPlatform: {
base: 'Dartium',
flags: ['--enable-experimental-web-platform-features'] }
},
browsers: ['ChromeCanary'],
port: 9876
});
config.plugins.push(require('./tools/transpiler/karma-traceur-preprocessor'));
};