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

Having problems testing when using SystemJS for module control #552

Closed
buddyp450 opened this issue Jun 26, 2015 · 2 comments
Closed

Having problems testing when using SystemJS for module control #552

buddyp450 opened this issue Jun 26, 2015 · 2 comments

Comments

@buddyp450
Copy link

Please see the issue here for details: jestjs/jest#367

Can anyone point me in the right direction as far as setting up SystemJS for server-side testing configurations using node/iojs? I feel like SystemJS doesn't really fit for this but I'm unsure of what else to do when all of my modules depend on SystemJS for their mapped module loading.

@guybedford
Copy link
Member

So it sounds like jest assumes that your modules resolve based on the Node resolution algorithm.

Unfortunately this isn't compatible with SystemJS's resolution algorithm.

If there was a way in jest to set a "custom resolver" algorithm through an API then we could plug jspm into jest, but I'm not sure if this is currently possible.

@yoavniran
Copy link

I recently started using Jest and was surprised there wasnt a solution out there already to get Jest to play nice with my JSPM-based app.

fortunately, it gave me a nice excuse to write my first Gulp plugin: gulp-jest-jspm.
to use it, you dont even have to be using Gulp, you can simply use its getJestConfig() method to generate the config for you before you run Jest.

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

3 participants