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

Automatic tests detection #16

Open
isaac-peka opened this issue Apr 1, 2016 · 1 comment
Open

Automatic tests detection #16

isaac-peka opened this issue Apr 1, 2016 · 1 comment

Comments

@isaac-peka
Copy link

Great work on this library, as someone new to node it's really frustrating the way all of these great things don't just play nicely together.

It seems like using jestpack in it current form, you lose the benefit of the automatic tests detection since it forces you to maintain a registry of tests in your webpack config. Is there a way you could support plugging in something like webpack isomorphic tools, so there's no need to statically create a tests bundle?

I'd be happy to put together a proof of concept if you can give me a few pointers in the right direction about how something like that could be done, or if it's possible at all.

@richardscarrott
Copy link
Member

@sampeka I have to admit running bundled tests isn't ideal at all.

From what I can tell webpack isomorphic tools overloads Node's require which, in effect, is what Jest is doing itself so they wouldn't work well together.

There's probably potential to write a module loader for Jest which works in a similar way to isomorphic tools however I recently came across babel-plugin-webpack-loaders which, with a bit of performance tweaking, could be a viable approach as it would be far less intrusive to Jest so could take advantage of all the existing and future optimizations Jest makes because it's designed with babel transformations in mind.

I'm planning on putting something together at some stage soon.

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