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

Move jest config from package.json to dedicated jest.config.js file #35856

Conversation

Adnan-Bacic
Copy link
Contributor

Summary

According to: https://jestjs.io/docs/configuration

It is recommended to define the configuration in a dedicated JavaScript, TypeScript or JSON file. The file will be discovered automatically, if it is named jest.config.js|ts|mjs|cjs|json.

react-native projects have the jest config in package.json, this change aims to follow jest recommendations and have a dedicated file for jest configs.

Originally suggested here: react-native-community/discussions-and-proposals#583

Changelog

[GENERAL] [CHANGED] - Moved jest config from package.json to dedicated jest.config.js file

Test Plan

  1. cd template
  2. yarn
  3. yarn test

The test should (still) pass

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 17, 2023
@facebook-github-bot
Copy link
Contributor

@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,465,533 +0
android hermes armeabi-v7a 7,786,280 +0
android hermes x86 8,939,013 +0
android hermes x86_64 8,797,083 +0
android jsc arm64-v8a 9,650,654 +0
android jsc armeabi-v7a 8,385,129 +0
android jsc x86 9,712,847 +0
android jsc x86_64 10,190,031 +0

Base commit: 55af2fe
Branch: main

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 18, 2023
@facebook-github-bot
Copy link
Contributor

@robhogan merged this pull request in 473eb1d.

@Adnan-Bacic Adnan-Bacic deleted the move-jest-config-from-package.json-to-dedicated-jest.config.js-file branch April 21, 2023 06:06
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
…acebook#35856)

Summary:
According to: https://jestjs.io/docs/configuration

> It is recommended to define the configuration in a dedicated JavaScript, TypeScript or JSON file. The file will be discovered automatically, if it is named jest.config.js|ts|mjs|cjs|json.

react-native projects have the jest config in package.json, this change aims to follow jest recommendations and have a dedicated file for jest configs.

Originally suggested here: react-native-community/discussions-and-proposals#583

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[GENERAL] [CHANGED] - Moved jest config from package.json to dedicated jest.config.js file

Pull Request resolved: facebook#35856

Test Plan:
1. cd template
2. yarn
3. yarn test

The test should (still) pass

Reviewed By: christophpurrer

Differential Revision: D42544351

Pulled By: robhogan

fbshipit-source-id: e27d1dad2b52d757777c40a77d0639f381557c88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants