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

Add mts and cts to test match and test regex #14584

Merged
merged 11 commits into from
Oct 2, 2023
Merged

Add mts and cts to test match and test regex #14584

merged 11 commits into from
Oct 2, 2023

Conversation

yinm
Copy link
Contributor

@yinm yinm commented Sep 30, 2023

Summary

ref: #14149

This PR will solve

All of these extensions are missing from testMatch and testRegex.

Test plan

test locally

# /jest/e2e/test-match-default
$ node ../../packages/jest-cli/bin/jest.js
 PASS  __tests__/test.js
 PASS  dot-spec-tests/test.spec.jsx
 PASS  __tests__/test.cjs
 PASS  dot-spec-tests/test.spec.cjs
 PASS  dot-spec-tests/test.spec.cts
 PASS  dot-spec-tests/test.spec.tsx
 PASS  __tests__/test.tsx
 PASS  dot-spec-tests/test.spec.js
 PASS  __tests__/test.ts
 PASS  dot-spec-tests/test.spec.mjs
 PASS  __tests__/test.cts
 PASS  __tests__/test.mjs
 PASS  dot-spec-tests/test.spec.mts
 PASS  dot-spec-tests/test.spec.ts
 PASS  __tests__/test.mts
 PASS  __tests__/test.jsx

Test Suites: 16 passed, 16 total
Tests:       16 passed, 16 total
Snapshots:   0 total
Time:        0.694 s, estimated 1 s
Ran all test suites.

@netlify
Copy link

netlify bot commented Sep 30, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ba2fdb0
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/6517b6dbdc9307000813d76a
😎 Deploy Preview https://deploy-preview-14584--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

testMatch: [
'**/__tests__/**/*.?([mc])[jt]s?(x)',
'**/?(*.)+(spec|test).?([mc])[jt]s?(x)',
],
testPathIgnorePatterns: [NODE_MODULES_REGEXP],
testRegex: [],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Default option of testRegex is []. I think it's according to testMatch and testRegex can't be specified both options.
So, I only changed packages/jest-config/src/ValidConfig.ts and docs.

@yinm yinm marked this pull request as ready for review September 30, 2023 06:27
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

nice 👍

@SimenB SimenB enabled auto-merge (squash) October 2, 2023 08:45
@SimenB SimenB merged commit a889046 into jestjs:main Oct 2, 2023
62 checks passed
@yinm yinm deleted the add-mts-and-cts-to-testMatch-and-testRegex branch October 2, 2023 12:11
Copy link

github-actions bot commented Nov 2, 2023

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants