-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(dev): Centralize jest config #4907
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size-limit report 📦
|
sl0thentr0py
approved these changes
Apr 11, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool cleanup, lgtm!
…node, serverless, tracing, and utils
649be8d
to
174d8bd
Compare
lobsterkatie
added a commit
that referenced
this pull request
Apr 12, 2022
In #4907, all of our jest config was pulled out of `package.json` and put into `jest.config.js` files. This fixes our VSCode debug profile for unit tests to point to the new config.
lobsterkatie
added a commit
that referenced
this pull request
Apr 13, 2022
In #4907, all of our jest config was pulled out of `package.json` and put into `jest.config.js` files. This fixes our VSCode debug profile for unit tests to point to the new config.
Lms24
pushed a commit
that referenced
this pull request
Apr 26, 2022
Currently, we configure jest using a mix of `package.json` entries and `jest.config.js` files, and there's a great deal of repetition between configs. To make things DRYer and easier to update (as will happen in future PRs), this aims to fix that by creating a centralized jest config from which all others can inherit. To facilitate this inheritance, all config has been removed from `package.json` files and moved into `jest.config.js` files. This change was done in a few distinct stages: - Extracting the config which was identical across many packages into a central config file, and fixing a mistake they all contained, namely that they were using the regular tsconfig file rather than the test-specific one. - In the packages which were using exactly that config, creating a new `jest.config.js` file and inheriting directly from the central jest config with no changes. - In the packages whose config varied only slightly from the boilerplate config, creating a new `jest.config.js` file and inheriting from the central file with small changes. This also required adding `.tsx` files to the central config. - In the browser package, moving the existing `jest.config.js` for the unit tests to the repo root level and refactoring it to inherit from the central file. This also required specifying a coverage directory in the central config and modifying the browser package's yarn test commands. - In the node integration test package, refactoring the existing `jest.config.js` to inherit from the central file. This also required creating a test-specific tsconfig to match the one in other packages. - Finally, making a small optimization (narrowing the scope of where to look for tests) in the now universally-used central config.
Lms24
pushed a commit
that referenced
this pull request
Apr 26, 2022
In #4907, all of our jest config was pulled out of `package.json` and put into `jest.config.js` files. This fixes our VSCode debug profile for unit tests to point to the new config.
lobsterkatie
added a commit
that referenced
this pull request
Apr 26, 2022
Currently, we configure jest using a mix of `package.json` entries and `jest.config.js` files, and there's a great deal of repetition between configs. To make things DRYer and easier to update (as will happen in future PRs), this aims to fix that by creating a centralized jest config from which all others can inherit. To facilitate this inheritance, all config has been removed from `package.json` files and moved into `jest.config.js` files. This change was done in a few distinct stages: - Extracting the config which was identical across many packages into a central config file, and fixing a mistake they all contained, namely that they were using the regular tsconfig file rather than the test-specific one. - In the packages which were using exactly that config, creating a new `jest.config.js` file and inheriting directly from the central jest config with no changes. - In the packages whose config varied only slightly from the boilerplate config, creating a new `jest.config.js` file and inheriting from the central file with small changes. This also required adding `.tsx` files to the central config. - In the browser package, moving the existing `jest.config.js` for the unit tests to the repo root level and refactoring it to inherit from the central file. This also required specifying a coverage directory in the central config and modifying the browser package's yarn test commands. - In the node integration test package, refactoring the existing `jest.config.js` to inherit from the central file. This also required creating a test-specific tsconfig to match the one in other packages. - Finally, making a small optimization (narrowing the scope of where to look for tests) in the now universally-used central config.
lobsterkatie
added a commit
that referenced
this pull request
Apr 26, 2022
In #4907, all of our jest config was pulled out of `package.json` and put into `jest.config.js` files. This fixes our VSCode debug profile for unit tests to point to the new config.
lobsterkatie
added a commit
that referenced
this pull request
Apr 26, 2022
Currently, we configure jest using a mix of `package.json` entries and `jest.config.js` files, and there's a great deal of repetition between configs. To make things DRYer and easier to update (as will happen in future PRs), this aims to fix that by creating a centralized jest config from which all others can inherit. To facilitate this inheritance, all config has been removed from `package.json` files and moved into `jest.config.js` files. This change was done in a few distinct stages: - Extracting the config which was identical across many packages into a central config file, and fixing a mistake they all contained, namely that they were using the regular tsconfig file rather than the test-specific one. - In the packages which were using exactly that config, creating a new `jest.config.js` file and inheriting directly from the central jest config with no changes. - In the packages whose config varied only slightly from the boilerplate config, creating a new `jest.config.js` file and inheriting from the central file with small changes. This also required adding `.tsx` files to the central config. - In the browser package, moving the existing `jest.config.js` for the unit tests to the repo root level and refactoring it to inherit from the central file. This also required specifying a coverage directory in the central config and modifying the browser package's yarn test commands. - In the node integration test package, refactoring the existing `jest.config.js` to inherit from the central file. This also required creating a test-specific tsconfig to match the one in other packages. - Finally, making a small optimization (narrowing the scope of where to look for tests) in the now universally-used central config.
lobsterkatie
added a commit
that referenced
this pull request
Apr 26, 2022
In #4907, all of our jest config was pulled out of `package.json` and put into `jest.config.js` files. This fixes our VSCode debug profile for unit tests to point to the new config.
AbhiPrasad
pushed a commit
that referenced
this pull request
May 30, 2022
Currently, we configure jest using a mix of `package.json` entries and `jest.config.js` files, and there's a great deal of repetition between configs. To make things DRYer and easier to update (as will happen in future PRs), this aims to fix that by creating a centralized jest config from which all others can inherit. To facilitate this inheritance, all config has been removed from `package.json` files and moved into `jest.config.js` files. This change was done in a few distinct stages: - Extracting the config which was identical across many packages into a central config file, and fixing a mistake they all contained, namely that they were using the regular tsconfig file rather than the test-specific one. - In the packages which were using exactly that config, creating a new `jest.config.js` file and inheriting directly from the central jest config with no changes. - In the packages whose config varied only slightly from the boilerplate config, creating a new `jest.config.js` file and inheriting from the central file with small changes. This also required adding `.tsx` files to the central config. - In the browser package, moving the existing `jest.config.js` for the unit tests to the repo root level and refactoring it to inherit from the central file. This also required specifying a coverage directory in the central config and modifying the browser package's yarn test commands. - In the node integration test package, refactoring the existing `jest.config.js` to inherit from the central file. This also required creating a test-specific tsconfig to match the one in other packages. - Finally, making a small optimization (narrowing the scope of where to look for tests) in the now universally-used central config.
AbhiPrasad
pushed a commit
that referenced
this pull request
May 30, 2022
In #4907, all of our jest config was pulled out of `package.json` and put into `jest.config.js` files. This fixes our VSCode debug profile for unit tests to point to the new config.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, we configure jest using a mix of
package.json
entries andjest.config.js
files, and there's a great deal of repetition between configs. To make things DRYer and easier to update (as will happen in future PRs), this aims to fix that by creating a centralized jest config from which all others can inherit. To facilitate this inheritance, all config has been removed frompackage.json
files and moved intojest.config.js
files.For ease of review, this has been broken down into a few distinct stages, each represented by a commit:
jest.config.js
file and inheriting directly from the central jest config with no changes.jest.config.js
file and inheriting from the central file with small changes. This also required adding.tsx
files to the central config.jest.config.js
for the unit tests to the repo root level and refactoring it to inherit from the central file. This also required specifying a coverage directory in the central config and modifying the browser package's yarn test commands.jest.config.js
to inherit from the central file. This also required creating a test-specific tsconfig to match the one in other packages.