Test Coverage React, Istanbul -_registerComponent(…): Target container is not a DOM element
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am writing an app with react / redux / webpack. I am building out my testing with karma, mocha and want to use istanbul for test coverage. In an attempt to get coverage to work with karma-coverage I have set up the following karma.config.js var argv = require ( 'yargs' ). argv ; var path = require ( 'path' ); var webpack = require ( 'webpack' ); const PATHS = { test : path . join ( __dirname , 'test' ), app : path . join ( __dirname , 'app' ), } module . exports = function ( config ) { config . set ({ // only use PhantomJS for