-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
react-native-editor: move parser tests to a test directory #48615
Conversation
Size Change: 0 B Total Size: 1.33 MB ℹ️ View Unchanged
|
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.
Great catch! It will also prevent publishing these tests to npm.
By the way the Jest config for web unit tests ( https://github.com/WordPress/gutenberg/blob/trunk/test/unit/jest.config.js#L29-L31 If all tests are in correct directories and are not part of build, these patterns should also be redundant. |
Nice 👍 I appreciate splitting the atomic changes out of the Jest upgrade PR 👍 |
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 🎊 ! Thanks @jsnajdr for this improvement 🙇 !
Spinoff from the Jest upgrade in #47388 which moves some tests to a
test
subdirectory. The result is that these test files are excluded from the build and are not transpiled and copied into./build
and./build-module
.I also removed
../globals
imports from the test files because these imports are already done by the tested modules.Now when the test files are excluded from the build, we no longer need to add the build directories to
testPathIgnorePatterns
. These exclusions are difficult to implement once you change therootDir
and want to include..
in the paths. Paths in regular expressions are not resolved, the expression including..
is matched against the real filename, and never matches anything.