1 Star 0 Fork 1

devenc/diagram-js

forked from mirrors_bpmn-io/diagram-js 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
karma.conf.js 2.02 KB
一键复制 编辑 原始数据 按行查看 历史
/* eslint-env node */
var path = require('path');
var coverage = process.env.COVERAGE;
// configures browsers to run test against
// any of [ 'ChromeHeadless', 'Chrome', 'Firefox', 'IE', 'PhantomJS' ]
var browsers = (process.env.TEST_BROWSERS || 'ChromeHeadless').split(',');
// use puppeteer provided Chrome for testing
process.env.CHROME_BIN = require('puppeteer').executablePath();
var absoluteBasePath = path.resolve(__dirname);
var suite = coverage ? 'test/coverageBundle.js' : 'test/testBundle.js';
module.exports = function(karma) {
karma.set({
frameworks: [
'mocha',
'sinon-chai',
'webpack'
],
files: [
suite
],
preprocessors: {
[suite]: [ 'webpack' ]
},
reporters: [ 'progress' ].concat(coverage ? 'coverage' : []),
browsers,
browserNoActivityTimeout: 30000,
coverageReporter: {
reporters: [
{ type: 'lcov', subdir: '.' }
]
},
autoWatch: false,
singleRun: true,
webpack: {
mode: 'development',
target: 'browserslist:last 2 versions, IE 11',
module: {
rules: [
{
test: /TestHelper/,
sideEffects: true
},
{
test: /\.css$/,
type: 'asset/source'
},
{
test: /\.png$/,
type: 'asset/resource'
}
].concat(
coverage ? {
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
plugins: [
[ 'istanbul', {
include: [
'lib/**'
]
} ]
],
}
}
} : []
)
},
resolve: {
mainFields: [
'dev:module',
'module',
'main'
],
modules: [
'node_modules',
absoluteBasePath
]
},
devtool: 'eval-source-map'
}
});
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/devenc/diagram-js.git
git@gitee.com:devenc/diagram-js.git
devenc
diagram-js
diagram-js
develop

搜索帮助