Skip to content
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

Remove rxjs from imports #17

Closed
thymikee opened this issue Apr 13, 2017 · 4 comments
Closed

Remove rxjs from imports #17

thymikee opened this issue Apr 13, 2017 · 4 comments

Comments

@thymikee
Copy link
Owner

As stated here: angular/angular-cli#4543 (comment).
It shouldn't be auto included. Although need to add a guide on some useful imports like:

import 'rxjs/add/operator/map';
import 'rxjs/add/operator/switchMap';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/catch';
@thymikee
Copy link
Owner Author

For lots of folks it would be a breaking change, so I'd publish it as v1.
We could also add above as defaults, which resulted in ~10% faster test runs in my case.

cc: @Meligy

@Meligy
Copy link

Meligy commented Apr 13, 2017

As someone who got bitten by inclusion of RxJS, I'd really say please do not include it.

It should show an error, which tells people that they are missing something.

Since this project is meant for the Angular CLI, I'd suggest it should be as close as possible to what it puts in src/test.ts (source).

Only add stuff that is required to get jest running, and if possible, try to use the polyfills.ts that is already in the project as well. People can use this for common RxJS operators if they want.

@Meligy
Copy link

Meligy commented Apr 13, 2017

And, on another side, something that I have not mentioned but really should have: This project is SUPER AWESOME, and does make what seemed a very tough job become super nice. Thanks heaps.

@thymikee
Copy link
Owner Author

Yeah, so we can't really use polfills.ts because it includes browser version of Zone. However we can import frequent rxjs operators (like map) in the setupJest.ts file. I'll post a guide later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants