我有一个奇怪的问题:如果我用23个测试用例运行Karma,那么测试就挂起了。但是,如果我使用任何其他数量的测试用例(24,25,26)运行Karma,它会很快工作。什么问题会导致这种情况?
karmar.conf.js
var webpackConfig = require('./webpack.config.js')
// karma.conf.js
module.exports = function (config) {
config.set({
browsers: ['Chrome'],
frameworks: ['jasmine'],
// this is the entry file for all our tests.
files: ['index.js'],
// we will pass the entry file to webpack for bundling.
preprocessors: {
'index.js': ['webpack']
},
// use the webpack config
webpack: webpackConfig,
// avoid walls of useless text
webpackMiddleware: {
noInfo: true
},
browserNoActivityTimeout: 100000,
reporters: ["spec"],
singleRun: true
})
}发布于 2018-05-03 10:49:02
我想我的测试用例代码有错误的模式,所以花了这么长时间来测试!下面是我注意到我的测试用例变得更快的几件事
https://stackoverflow.com/questions/49974995
复制相似问题