Closed ghost closed 8 years ago
Even I tried going on one entry webpack for the source and run all the tests separably through test/*..test.ts ['webpack'] preprocessor, and that doesn't work neither :(
TypeError: Cannot read property 'split' of undefined
at HtmlReport.Report.mix.writeDetailPage
^ Based on this error (I was getting the same thing), it looks like you're using the HTML coverage reporter, which is the same issue as https://github.com/deepsweet/istanbul-instrumenter-loader/issues/32. Do the suggestions there resolve your issue?
I solved the issue by completely COPYING from this repo: https://github.com/zbicin/angular-webpack-typescript-karma-coverage
Thanks anyway
That's for webpack 1, we are now on webpack 3.
You're right. This issue closed years ago :laughing:
Hi, I'm using TypeScript via webpack, with one entry point for the source and one entry point for the tests.
Here is my webpack.conf.js file:
module.exports = { debug: true, devtool: 'inline-source-map', output: { filename: 'all.min.js', }, module : { loaders : [ { test: /.tsx?$/, include: path.resolve(dirname, 'src/'), loader: 'ts-loader' } ], postLoaders: [ // instrument only testing sources with Istanbul { test: /.tsx?$/, include: path.resolve(dirname, 'src/'), loader: 'istanbul-instrumenter' } ] } }
When adding istanbul-instrumenter as postLoaders it's really working well and I can see all the files separated like I want, but unfortunate I receive this error:
TypeError: Cannot read property 'split' of undefined] TypeError: Cannot read property 'split' of undefined at HtmlReport.Report.mix.writeDetailPage
When removing it, all works, but one big bundled file will be exported to the html report.
Can you help me with that?
Thanks, Best Regards