You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.
I'm trying to run karma tests using angular cli and PhantomJS (ng test --code-coverage --single-run) but am getting an error which seems to be causing 24 out of my 33 unit tests to fail. When I run the tests with Chrome as the configured browser, all of the tests pass.
PhantomJS 2.1.1 (Windows 7.0.0) AppService should be created FAILED
TypeError: JSON.stringify cannot serialize cyclic structures. in http://localhost:9876/_karma_webpack_/polyfills.bundle.js (line 5424)
stringify@[native code]
stringify@http://localhost:9876/_karma_webpack_/polyfills.bundle.js:5424:28
displayModal@http://localhost:9876/_karma_webpack_/scripts.bundle.js:4473:57
createModalContent@http://localhost:9876/_karma_webpack_/scripts.bundle.js:4453:41
BMS@http://localhost:9876/_karma_webpack_/scripts.bundle.js:7282:43
BMSService@http://localhost:9876/_karma_webpack_/main.bundle.js:2095:25930
_createClass@http://localhost:9876/_karma_webpack_/vendor.bundle.js:84475:34
_createProviderInstance$1@http://localhost:9876/_karma_webpack_/vendor.bundle.js:84447:38
resolveNgModuleDep@http://localhost:9876/_karma_webpack_/vendor.bundle.js:84432:42
_createClass@http://localhost:9876/_karma_webpack_
...(there was more in the stack but I cropped it)
In other issues people had with Karma and PhantomJS some suggested uncommenting the polyfills.ts file. I figured that might be related since the error seems to be coming from the polyfills bundled file so I tried running the tests with the polyfills commented out and also with them uncommented out and it didn't make a difference either way.
Expected behavior should be the same as when I run the tests with Chrome as a browser which is that the tests should all pass.
What is the motivation / use case for changing the behavior?
It doesn't work with PhantomJS. I previously posted a question on Stack Overflow and someone said this was a known issue but I didn't see any issues logged on this repo so I just wanted to check if it was known with this project.
The text was updated successfully, but these errors were encountered:
I'm submitting a bug report
Webpack version:
angular-cli version 1.6.1 which is using webpack ~3.10.0
Webpack Karma version:
see above
Karma version:
2.0.0
Please tell us about your environment:
Windows 7
Browser: PhantomJS 2.1.1
"karma-phantomjs-launcher": "1.0.4"
Current behavior:
I'm trying to run karma tests using angular cli and PhantomJS (ng test --code-coverage --single-run) but am getting an error which seems to be causing 24 out of my 33 unit tests to fail. When I run the tests with Chrome as the configured browser, all of the tests pass.
In other issues people had with Karma and PhantomJS some suggested uncommenting the polyfills.ts file. I figured that might be related since the error seems to be coming from the polyfills bundled file so I tried running the tests with the polyfills commented out and also with them uncommented out and it didn't make a difference either way.
Here is my karma.conf.js file: http://plnkr.co/edit/SlYdbKzqddBwmdKNMK0U?p=catalogue
Expected behavior should be the same as when I run the tests with Chrome as a browser which is that the tests should all pass.
It doesn't work with PhantomJS. I previously posted a question on Stack Overflow and someone said this was a known issue but I didn't see any issues logged on this repo so I just wanted to check if it was known with this project.
The text was updated successfully, but these errors were encountered: