Skip to content

Commit

Permalink
chore: configure testing-library/react to work with data-test attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric committed Dec 3, 2024
1 parent 1123f5f commit 8f07597
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config/testSetup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { configure } from '@testing-library/dom'

configure({
testIdAttribute: 'data-test',
})
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@
"jest": {
"moduleNameMapper": {
"^.+\\.(css|sass|scss)$": "identity-obj-proxy"
}
},
"setupFilesAfterEnv": [
"<rootDir>/config/testSetup.js"
]
},
"resolutions": {
"@dhis2/ui": "^10.1.4"
Expand Down

0 comments on commit 8f07597

Please sign in to comment.