Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

53 lines
1.3 KiB

const webpackConfig = require('./webpack.config');
module.exports = function calculateConfig(config) {
const _config = {
/*
* Base path that will be used to resolve all patterns (e.g. files, exclude).
*/
basePath: '',
frameworks: ['jasmine', 'webpack'],
/*
* Load additional test shim to setup angular for testing.
*/
files: [
{ pattern: './app-config/karma-test-shim.js', watched: false },
],
preprocessors: {
'./app-config/karma-test-shim.js': ['webpack', 'sourcemap'],
},
/*
* Load the files with webpack and use test configuration for it.
*/
webpack: webpackConfig({ target: 'tests', jit: true }),
webpackMiddleware: {
stats: 'errors-only',
},
/*
* Leave Jasmine Spec Runner output visible in browser.
*/
client: {
clearContext: false,
},
/*
* Use a mocha style console reporter and html reporter.
*/
reporters: ['kjhtml', 'mocha'],
/*
* Run with chrome to enable debugging.
*
* available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
*/
browsers: ['Chrome'],
};
config.set(_config);
};