-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react): restore missing types from lib (#1348)
- Loading branch information
1 parent
fdeac72
commit 4e6294d
Showing
6 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* global window */ | ||
import { configure } from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
import '@testing-library/jest-dom'; | ||
import 'jest-axe/extend-expect'; | ||
import { configureAxe } from 'jest-axe'; | ||
|
||
configure({ adapter: new Adapter() }); | ||
configureAxe({ | ||
rules: { | ||
region: { enabled: false } | ||
} | ||
}); | ||
|
||
if ( | ||
!Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, 'innerText') | ||
) { | ||
// JSDOM doesn't fully support innerText, but we can fall back to | ||
// using textContent for now until this gets patched | ||
Object.defineProperty(window.HTMLElement.prototype, 'innerText', { | ||
get() { | ||
return this.textContent; | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["src/**/*", "__tests__/setupTests.ts"], | ||
"include": ["src/**/*"], | ||
"exclude": ["node_modules"], | ||
"compilerOptions": { | ||
"skipLibCheck": true | ||
"skipLibCheck": true, | ||
"declarationDir": "lib", | ||
"declaration": true | ||
} | ||
} |