admin管理员组文章数量:1401624
how to made karma test result output from source file not from bundle file (common.js) in vs code. I want to see in what moudle file error made. Like: base/src/index.js 14:23
karma.conf.js_______________________________________________________
const path = require('path');
module.exports = function(config) {
config.set({
frameworks: ['jasmine'],
files: [
'src/**/*.js',
'test/**/*.spec.js'
],
preprocessors: {
'src/**/*.js': ['webpack', 'sourcemap'],
'test/**/*.spec.js': ['webpack', 'sourcemap']
},
webpack: {
mode: 'development',
devtool: 'inline-source-map',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
]
}
},
browsers: ['Chrome'],
reporters: ['verbose'],
singleRun: false,
autoWatch: true,
plugins: [
'karma-webpack',
'karma-sourcemap-loader',
'karma-chrome-launcher',
'karma-jasmine',
'karma-mocha-reporter',
'karma-verbose-reporter'
]
});
};
本文标签: how to made karma test result output from source file not from bundle file in vs codeStack Overflow
版权声明:本文标题:how to made karma test result output from source file not from bundle file in vs code - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744316970a2600312.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论