Skip to content

Automatic tests detection #16

Open

Description

@isaac-peka

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.

Activity

  1. richardscarrott commented on Apr 26, 2016

    @richardscarrott
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions