How to configure karma so typescript source files would be debuggable

后端 未结 2 703
粉色の甜心
粉色の甜心 2021-02-04 14:49

I\'ve downloaded a seed project Angular2 Webpack Starter and got it up and running without an issue. One inconvenience that I have with it is debugging source files under unit t

2条回答
  •  佛祖请我去吃肉
    2021-02-04 15:44

    You need to comment out Istanbul loader inside your webpack.test.config.js, like this

        // {
        //   enforce: 'post',
        //   test: /\.(js|ts)$/,
        //   loader: 'istanbul-instrumenter-loader',
        //   include: helpers.root('src'),
        //   exclude: [
        //     /\.(e2e|spec)\.ts$/,
        //     /node_modules/
        //   ]
        // }
    

    then simply run:

     npm run watch:test
    

提交回复
热议问题