Extend and patch @testing-library/jest-dom matchers
- Patches the
toHaveStylecolor mismatch issue (#350) - Provides a drop-in update that avoids changes to test files, making it easy to remove once the issue in
@testing-library/jest-domis fixed in the future.
npm install -D jest-dom-extendedLoad the setup file after @testing-library/jest-dom in your test configuration.
{
"setupFilesAfterEnv": [
"@testing-library/jest-dom",
"jest-dom-extended/jest"
]
}export default defineConfig({
test: {
setupFiles: [
"@testing-library/jest-dom",
"jest-dom-extended/vitest",
],
},
});