-
Notifications
You must be signed in to change notification settings - Fork 1
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
Introduce common preset for Jest test configuration #1411
Merged
Merged
Conversation
This file contains 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
github-actions
bot
added
the
maintenance
Changes to the build process or auxilary tools and libraries or other maintenance
label
May 15, 2024
✅ Deploy Preview for spirit-design-system-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for spirit-design-system ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
literat
force-pushed
the
chore/jest-config-spirit
branch
from
May 15, 2024 20:11
c82c013
to
8615c83
Compare
literat
force-pushed
the
chore/jest-config-spirit
branch
from
May 15, 2024 20:21
8615c83
to
e41d780
Compare
literat
commented
May 15, 2024
literat
commented
May 15, 2024
literat
commented
May 15, 2024
literat
force-pushed
the
chore/jest-config-spirit
branch
from
May 16, 2024 13:34
b85c3c9
to
3239537
Compare
literat
requested review from
pavelklibani,
curdaj,
a team,
adamkudrna and
crishpeen
as code owners
May 16, 2024 13:44
literat
force-pushed
the
chore/jest-config-spirit
branch
3 times, most recently
from
May 16, 2024 13:52
73e527e
to
cf0453c
Compare
crishpeen
approved these changes
May 21, 2024
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.
LGTM
literat
force-pushed
the
chore/jest-config-spirit
branch
from
May 22, 2024 09:30
cf0453c
to
7fa9d06
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
maintenance
Changes to the build process or auxilary tools and libraries or other maintenance
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.
Description
We are repeating a lot of configuration for our tooling. There is a way to create presets for Jest and other tools. This is a first try that should present the preset for Jest, which can be used by all packages.
There will be some future steps that will introduce the usage of setup files and general mocking. This PR is now moving the most common configurations into the preset. It tries not to break everything.
There is also a move of the
jest.config
file from theconfig
directory to the root of each package. Please consider if this is a good approach, but it seems to me, that all packages across the JS-verse are now adopting the similar naming of the configuration file and that is*.config.{js, ts, mjs, cjs}
. Actually, I think it is a good move but what I am missing now are the files starting with the dot.
, because they are naturally sorted by name, and I know that all the files with the starting dot are configurations. Now with thejest.config
andeslint.config
andprettier.config
it will be really messy there. 🤷♂️Note: there are actually two presets, one for the browser environment and one for the server. The server is used by default. Please, see a readme of the package.
Additional context
Issue reference