Great articles, really loved the series :). I need your suggestion with my Angular unit test problem. I have a 'abc.service' which initializes a 'Secondary App' for a remote signup for account creation. When I run the tests it throws error 'Secondary App already exists'. But when I comment that initialization method, everything works fine. How can I solve this problem? I tried the following:
Exclude that 'abc.service' in Karma.config (but does not seem to work)
I am using fdescribe with spec files to run specific tests
This seems an app compilation problem during test run (Karma finds two app initializations)
I'm a developer, a community builder, and a relentless learner. I'm a Google Developer Expert in Angular, a Pluralsight author, a conference speaker, and a volunteer for women in tech groups. ❤️🍷📚
Hi there! I just saw your comment so hopefully this response isn't too late. Are you testing your 'abc.service' and it has a reference to another service? or something else?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great articles, really loved the series :). I need your suggestion with my Angular unit test problem. I have a 'abc.service' which initializes a 'Secondary App' for a remote signup for account creation. When I run the tests it throws error 'Secondary App already exists'. But when I comment that initialization method, everything works fine. How can I solve this problem? I tried the following:
Please help me out, thanks a lot!
Hi there! I just saw your comment so hopefully this response isn't too late. Are you testing your 'abc.service' and it has a reference to another service? or something else?