awesome-cordova-plugins/karma.conf.js

41 lines
874 B
JavaScript
Raw Normal View History

2018-08-17 04:23:03 +08:00
'use strict';
2017-05-14 15:25:33 +08:00
module.exports = config => {
const conf = {
2018-08-17 04:23:03 +08:00
frameworks: ['jasmine', 'karma-typescript'],
2017-05-14 15:25:33 +08:00
2018-08-17 04:23:03 +08:00
plugins: ['karma-typescript', 'karma-jasmine', 'karma-phantomjs-launcher'],
2017-05-14 15:25:33 +08:00
preprocessors: {
'src/**/*.ts': ['karma-typescript']
},
karmaTypescriptConfig: {
bundlerOptions: {
entrypoints: /\.spec\.ts$/,
2018-08-17 04:23:03 +08:00
transforms: [require('karma-typescript-es6-transform')()]
2017-05-14 15:25:33 +08:00
},
compilerOptions: {
lib: ['es2015', 'dom'],
paths: {
2018-08-17 04:23:03 +08:00
'@ionic-native/core': ['./src/@ionic-native/core']
2017-05-14 15:25:33 +08:00
},
baseUrl: '.'
}
},
2018-08-17 04:23:03 +08:00
files: [{ pattern: 'src/**/*.ts', included: true, watched: true }],
2017-05-14 15:25:33 +08:00
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.INFO,
autoWatch: true,
2018-08-17 04:23:03 +08:00
browsers: ['PhantomJS'],
2017-05-14 15:25:33 +08:00
singleRun: false
};
config.set(conf);
};