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

fix(test): Update jestConfig to not transform json file #366

Merged
merged 2 commits into from May 28, 2019

Conversation

thebillg
Copy link
Contributor

@thebillg thebillg commented May 28, 2019

Overview of the change

Update jestConfig to exclude json file in the transform config.

Reasons behind it

The existing regex matches .json file as well, as a result any json file will be transformed too. This was not a problem before jest-runtime 24.8, but after Renovate updated jest-runtime in our repo to version 24.8, our test failed, see the error message here https://buildkite.com/seek/adv-account-management-ui/builds/2897#c7d0685f-bde2-4acb-a01c-4e8a3a1e9fa0/158-262.

I did some search and found this Jest issue (jestjs/jest#8426 (comment)) similar to the error we got. I fixed the error in our repo by explicitly exclude json file from being transformed, see the commit at here https://github.com/SEEK-Jobs/adv-account-management-ui/pull/500/commits/04f74ba1e750fc7f538c3fbf2c02816ff9b37f4e.

And after that I checked the default jest config for Sku, I think the regex for matching js file was unintentionally matching json files based on the comment above the code. Hence this PR.

@thebillg thebillg requested a review from a team as a code owner May 28, 2019 02:10
Copy link
Contributor

@michaeltaranto michaeltaranto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Really appreciate the thorough PR description too 🙌

Copy link
Contributor

@mattcompiles mattcompiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR mate 👍

@mattcompiles mattcompiles changed the title Update jestConfig to not transform json file fix(test): Update jestConfig to not transform json file May 28, 2019
@michaeltaranto michaeltaranto merged commit d25df5a into seek-oss:master May 28, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants