I want to use Chutzpah to run JavaScript unit tests in Visual Studio 2013. As long as I don't reference angular.js the tests will run. Using angular.js those tests won't run and the VS Output gives me the following message:
Error: Error: Instrumentation error, you cannot redefine the 'window' variable in file:///e:/.../scripts/angular/angular.js:1529
in file:///C:/USERS/.../APPDATA/LOCAL/MICROSOFT/VISUALSTUDIO/12.0/EXTENSIONS/MWY50QF4.VGS/TestFiles/Coverage/blanket_jasmine_v2.js.**
Does anyone know about this problem?
This is only an issue if you are running code coverage. This is an issue with Blanket.js (the library Chutzpah uses for code coverage) and Angualr.js conflicting. See this issue for more details: https://github.com/alex-seville/blanket/issues/311
In short, a simple workaround is to use the minified version of Angular.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With