加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/fengyuanchen/viewer
克隆/下载
karma.conf.js 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
Chen Fengyuan 提交于 2019-12-14 19:50 . build: update config
const babel = require('rollup-plugin-babel');
const commonjs = require('rollup-plugin-commonjs');
const nodeResolve = require('rollup-plugin-node-resolve');
const puppeteer = require('puppeteer');
process.env.CHROME_BIN = puppeteer.executablePath();
process.env.NODE_ENV = 'test';
module.exports = (config) => {
config.set({
autoWatch: false,
browsers: ['ChromeHeadless'],
client: {
mocha: {
timeout: 10000,
},
},
coverageIstanbulReporter: {
reports: ['html', 'lcovonly', 'text-summary'],
},
files: [
'dist/viewer.css',
'test/index.js',
{
pattern: 'docs/images/*',
included: false,
},
],
frameworks: ['mocha', 'chai'],
preprocessors: {
'test/index.js': ['rollup'],
},
reporters: ['mocha', 'coverage-istanbul'],
rollupPreprocessor: {
output: {
format: 'iife',
name: 'Anonymous',
sourcemap: 'inline',
},
plugins: [
nodeResolve(),
commonjs(),
babel(),
],
},
singleRun: true,
});
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化