2014-09-25 17:04:46 -04:00
|
|
|
// Karma configuration
|
|
|
|
// Generated on Thu Sep 25 2014 11:52:02 GMT-0700 (PDT)
|
2014-12-05 19:26:30 -05:00
|
|
|
var file2moduleName = require('./tools/build/file2modulename');
|
2014-09-25 17:04:46 -04:00
|
|
|
|
|
|
|
module.exports = function(config) {
|
|
|
|
config.set({
|
|
|
|
|
|
|
|
frameworks: ['jasmine'],
|
|
|
|
|
|
|
|
files: [
|
2014-10-06 20:35:00 -04:00
|
|
|
// Sources and specs.
|
|
|
|
// Loaded through the es6-module-loader, in `test-main.js`.
|
|
|
|
{pattern: 'modules/**', included: false},
|
2015-02-06 16:36:52 -05:00
|
|
|
{pattern: 'tools/transpiler/spec/**', included: false},
|
2014-10-06 20:35:00 -04:00
|
|
|
|
2014-09-25 17:04:46 -04:00
|
|
|
'node_modules/traceur/bin/traceur-runtime.js',
|
2014-10-06 20:35:00 -04:00
|
|
|
'node_modules/es6-module-loader/dist/es6-module-loader-sans-promises.src.js',
|
2014-10-30 13:52:32 -04:00
|
|
|
// Including systemjs because it defines `__eval`, which produces correct stack traces.
|
|
|
|
'node_modules/systemjs/dist/system.src.js',
|
2014-10-06 20:35:00 -04:00
|
|
|
'node_modules/systemjs/lib/extension-register.js',
|
2014-12-05 21:30:45 -05:00
|
|
|
'node_modules/zone.js/zone.js',
|
2014-12-11 14:36:05 -05:00
|
|
|
'node_modules/zone.js/long-stack-trace-zone.js',
|
2014-10-06 20:35:00 -04:00
|
|
|
|
2014-12-05 19:26:30 -05:00
|
|
|
'tools/build/file2modulename.js',
|
2014-09-25 17:04:46 -04:00
|
|
|
'test-main.js'
|
|
|
|
],
|
|
|
|
|
2015-01-08 13:02:23 -05:00
|
|
|
exclude: [
|
|
|
|
'modules/**/e2e_test/**'
|
|
|
|
],
|
|
|
|
|
2014-09-25 17:04:46 -04:00
|
|
|
preprocessors: {
|
|
|
|
'modules/**/*.js': ['traceur'],
|
2014-09-28 16:55:01 -04:00
|
|
|
'modules/**/*.es6': ['traceur'],
|
2015-02-06 16:36:52 -05:00
|
|
|
'tools/transpiler/spec/**/*.js': ['traceur'],
|
|
|
|
'tools/transpiler/spec/**/*.es6': ['traceur'],
|
2014-09-25 17:04:46 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
traceurPreprocessor: {
|
|
|
|
options: {
|
|
|
|
outputLanguage: 'es5',
|
2014-10-30 13:52:32 -04:00
|
|
|
sourceMaps: true,
|
2014-09-25 17:04:46 -04:00
|
|
|
script: false,
|
2014-11-07 12:31:51 -05:00
|
|
|
memberVariables: true,
|
2014-10-06 20:35:00 -04:00
|
|
|
modules: 'instantiate',
|
2014-09-25 17:04:46 -04:00
|
|
|
types: true,
|
2014-09-26 20:36:57 -04:00
|
|
|
typeAssertions: true,
|
|
|
|
typeAssertionModule: 'rtts_assert/rtts_assert',
|
2014-09-25 17:04:46 -04:00
|
|
|
annotations: true
|
|
|
|
},
|
2014-09-28 16:55:01 -04:00
|
|
|
resolveModuleName: file2moduleName,
|
2014-09-25 17:04:46 -04:00
|
|
|
transformPath: function(fileName) {
|
2014-10-06 20:35:00 -04:00
|
|
|
return fileName.replace(/\.es6$/, '.js');
|
2014-09-25 17:04:46 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2014-09-29 17:20:23 -04:00
|
|
|
customLaunchers: {
|
|
|
|
DartiumWithWebPlatform: {
|
|
|
|
base: 'Dartium',
|
|
|
|
flags: ['--enable-experimental-web-platform-features'] }
|
|
|
|
},
|
2014-10-02 16:38:12 -04:00
|
|
|
browsers: ['ChromeCanary'],
|
2014-10-09 16:50:25 -04:00
|
|
|
|
|
|
|
port: 9876
|
2014-09-25 17:04:46 -04:00
|
|
|
});
|
|
|
|
|
2014-09-26 20:39:27 -04:00
|
|
|
config.plugins.push(require('./tools/transpiler/karma-traceur-preprocessor'));
|
2014-09-25 17:04:46 -04:00
|
|
|
};
|