-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Subject cannot be invoked without 'new' when testing #8379
Comments
I see same issue. We had to downgrade the app to Temporary workaround:
It seems the test dependencies cannot handle ES2015 just yet. |
This is too bad :( We're targeting es6 because it greatly simplifies debugging and we don't need to support older browsers. Our tests target es5 to support PhantomJS. Is this is an issue with tests using tsconfig.app.json instead of tsconfig.spec.json for tests? I don't think changing tsconfig.app.json should matter to the tests? Thanks - Chad |
if it helps -- I also tried 1.6.0-beta.0 with no luck... |
Somewhat related... #6333 |
Normally I could fix this issue by moving the lib property of
to:
If it helps... |
Hi everyone, I got another workaround. Basically, it consists on setting 2 apps, one targeting ES2015 and the other targeting ES5. They both share the exact same source code. You can then run the tests on the ES5 app only. The approach is discussed on: Cheers! Note: of course, if you only target ES2015, you can bypass the ES5 building step showed on the post |
…es2015 Added test fails without the fix with the error described in the linked issue. Fixes angular#8379
…es2015 Added test fails without the fix with the error described in the linked issue. Fixes angular#8379
…es2015 Added test fails without the fix with the error described in the linked issue. Fixes angular#8379
…es2015 Added test fails without the fix with the error described in the linked issue. Fixes angular#8379
I can confirm this issue |
…es2015 Added test fails without the fix with the error described in the linked issue. Fixes angular#8379
Any solution? |
Waiting on Devo’s merge I hope 😀💪 |
…es2015 Added test fails without the fix with the error described in the linked issue. Fixes #8379
…es2015 Added test fails without the fix with the error described in the linked issue. Fixes #8379
still getting many:
my environment:
as mentioned above, this issue affects only when targeting |
…es2015 Added test fails without the fix with the error described in the linked issue. Fixes angular#8379
This bug is still valid. I get it every time I set
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
Angular v5.0.0
"@angular/cli": "1.5.0",
"@angular/compiler-cli": "5.0.0",
NOTE: this WORKS with all dependencies the same but
@angular/cli
at1.4.0-beta.2
Repro steps.
ng test
The log given by the failure.
Desired functionality.
Tests (on components) to pass as they did before.
Mention any other details that might be useful.
Upgraded to Angular 5.0.0. Everything works fine except tests now fail.
See: angular/angular#20215
angular-cli.json
package.json
The text was updated successfully, but these errors were encountered: