-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Closed
Labels
TestingRelated to testing with Next.js.Related to testing with Next.js.good first issueEasy to fix issues, good for newcomersEasy to fix issues, good for newcomers
Description
Verify canary release
- I verified that the issue exists in Next.js canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Wed Mar 2 00:30:59 UTC 2022
Binaries:
Node: 14.18.1
npm: 6.14.15
Yarn: 1.22.18
pnpm: N/A
Relevant packages:
next: 12.1.6
react: 18.1.0
react-dom: 18.1.0
What browser are you using? (if relevant)
Firefox
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
In the latest 12.1.6, running Jest locally with tests that try to locate elements using the data-testid
attr fail, this works fine in 12.1.5.
In my next config I have:
compiler: {
styledComponents: true,
reactRemoveProperties: true,
},
Expected Behavior
data-testid
should only be removed in production env, not local or preview envs.
To Reproduce
Create a projec with latest next, jest, and a test that looks for a data-testid
.
afladmark, arthurlbrjc, alebelcor and akira-toriyama
Metadata
Metadata
Assignees
Labels
TestingRelated to testing with Next.js.Related to testing with Next.js.good first issueEasy to fix issues, good for newcomersEasy to fix issues, good for newcomers