Closed jedwards1211 closed 9 years ago
After reading through the config options more, it looks like I'll be able to get Jest to load a pre-webpacked bundle. I'll go ahead and close this, and if any issues with running it that way come up, I'll reopen it.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Currently I run Jasmine tests inside of Webpack bundles in the following way:
__tests__
directories or specific subfolders of them for client/server and unit/integration--watch
flag, it runs Webpack in watch mode and re-runs Jasmine each time Webpack recompiles.This workflow is simple, easy to understand, and easy to customize for me. In contrast, it appears that Jest loads all files in
__tests__
directories, this behavior can't be overridden, and the documentation for Webpack integration clarify any details of the following:However, if I can simply run Webpack myself and tell Jest what bundle to run, it seems to me it would work like a charm.
Or, for even more flexibility (for example if I want to run Jest integration tests inside of Meteor) it would be nice if I could custom boot Jest just like one can custom boot Jasmine. The only way to get Meteor globals on scope in the browser or node is to have Meteor call my code. That means I can't have Jest call my code; I have to call Jest myself inside of my code called by Meteor.