-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: JSON reporters are broken after Karma 2.0.1 #3075
Closed
cexbrayat opened this issue
Jul 10, 2018
· 1 comment
· Fixed by karronoli/redpen#10 · May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Closed
Regression: JSON reporters are broken after Karma 2.0.1 #3075
cexbrayat opened this issue
Jul 10, 2018
· 1 comment
· Fixed by karronoli/redpen#10 · May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Comments
cexbrayat
added a commit
to cexbrayat/karma
that referenced
this issue
Jul 10, 2018
After migrating the the `browser.js` file to ES2015, the `Browser` class has now fields with circular references (like `emitter`), which breaks the Karma JSON reporters available starting with Karma 2.0.1. This commit removes the circular dependencies by adding a `toJSON()` method to the `Browser` class, which produces a similar result to the browser object before the migration. Fixes karma-runner#3075
I submitted #3076 as a potential fix for this issue, by adding a |
lusarz
pushed a commit
that referenced
this issue
Jul 11, 2018
After migrating the the `browser.js` file to ES2015, the `Browser` class has now fields with circular references (like `emitter`), which breaks the Karma JSON reporters available starting with Karma 2.0.1. This commit removes the circular dependencies by adding a `toJSON()` method to the `Browser` class, which produces a similar result to the browser object before the migration. Fixes #3075
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Starting from karma
2.0.1
, the JSON reporters available:are all failing as Karma now returns an object with a circular reference and all the reporters use
JSON.stringify
to generate their reports.Expected behaviour
The JSON reporters should continue to work as they were previously.
Actual behaviour
Running a simple test with
karma-json-reporter
produces:Environment Details
karma --version
): 2.0.2 (same issue with 2.0.3 and 2.0.4)karma.config.js
fileSteps to reproduce the behaviour
karma-json-reporter
tokarma.config.js
Other info
After a brief analysis, it looks like the migration of the
Browser
class to ES2015 introduced the regression (see bb012e2) as it added a bunch of fields on theBrowser
object, some of them self referencing.The text was updated successfully, but these errors were encountered: