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
{{ message }}
Repository navigation
Object with a property called 'version' causes problems in testing #2540
You'll see that the second console logging statement prints, but the first doesn't.
The log given by the failure.
No logging - that's the problem.
Mention any other details that might be useful.
The original manifestation of this problem was that I put an object that looks like one of the objects above in an Immutable.js List, but then almost all of the methods on the List failed (i.e. console.log(list.toArray()) never printed). Eventually, I was able to reproduce it in the simpler form that seemingly just the word "version" as a property name caused problems.
This has happened on two machines, one using the chrome launcher and one using the firefox launcher. I don't see the problem by trying to log a similar object literal in the node REPL, the Chrome console, or the Firefox console.
I don't have the problem running the application in the browser - just in the karma test.
I don't think this is an issue with Angular CLI. Angular CLI will simply trigger the Karma and this error is even reproducible without usage of ng test using plain Karma. Please report this to the Karma if there isn't an issue about it yet.
@LMFinney Seems that it was my mistake. I ran the tests again, and now it produces the same result for me. So you are right and this seems like a legit problem. I'll take a look at what happens on the execution.
@LMFinneyhttps://github.com/LMFinney Seems that it was my mistake. I
ran the tests again, and now it produces the same result for me. So you are
right and this seems like a legit problem. I'll take a look at what happens
on the execution.
Whoa that's weird. I just tried it with the console logs outside of the constructor, just in src/app/app.component.ts, and could repro on ng test (but not on ng serve).
Activity
RoopeHakulinen commentedon Oct 7, 2016
I don't think this is an issue with Angular CLI. Angular CLI will simply trigger the Karma and this error is even reproducible without usage of
ng testusing plain Karma. Please report this to the Karma if there isn't an issue about it yet.LMFinney commentedon Oct 7, 2016
I don't think @RoopeHakulinen is correct. I get different results running
ng testvskarma start:Notice that Handle2 is displayed in both runs, but Handle1 does not appear for
ng test. I made no changes to code or configuration between these runs.It looks to me like karma has no problem with this, but
ng testdoes.RoopeHakulinen commentedon Oct 8, 2016
@LMFinney Seems that it was my mistake. I ran the tests again, and now it produces the same result for me. So you are right and this seems like a legit problem. I'll take a look at what happens on the execution.
LMFinney commentedon Oct 8, 2016
Thanks!
On Oct 8, 2016 5:25 AM, "Roope Hakulinen" notifications@github.com wrote:
filipesilva commentedon Oct 10, 2016
Whoa that's weird. I just tried it with the console logs outside of the constructor, just in
src/app/app.component.ts, and could repro onng test(but not onng serve).filipesilva commentedon Oct 10, 2016
Even weirder... those console.log appear on the karma debugger:

Edit: also on the plain karma window, for that matter:

fix: override ui write level
fix: override ui write level
fix: override ui write level
fix: override ui write level
fix: override ui write level
fix: override ui write level
fix: override ui write level
fix: override ui write level
fix: override ui write level
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix: override ui write level