create-react-app-typescript icon indicating copy to clipboard operation
create-react-app-typescript copied to clipboard

Allowing GlobalSetup and GlobalTeardown for Jest testing.

Open Brian-McBride opened this issue 7 years ago • 0 comments

For my unit and integration tests, I really needed to leverage the newish feature in Jest GlobalSetup and GlobalTeardown.

It looks like Dan will add it to create-react-app. It's really just adding the passthrough keys. However, this script needs updated jest and ts-jest packages. Which also lead to some minor fixes prompted by ts-jest. https://github.com/facebook/create-react-app/issues/4393#issuecomment-426097503

Then, well, I saw a few really old npm package versions and bumped them, testing with a fresh create-react-app. My build, start, and test commands all work as expected in this Pull Request. Plus, I gain the ability to now setup and teardown global settings properly around unit/integration testing.

Brian-McBride avatar Oct 02 '18 04:10 Brian-McBride