mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Allow html element in addition to string (#37794)
This commit is contained in:
parent
10035b1b26
commit
b167c4b6a9
5
types/jest-axe/index.d.ts
vendored
5
types/jest-axe/index.d.ts
vendored
@ -34,7 +34,10 @@ export interface AxeOptions {
|
||||
* @param options Options to run aXe.
|
||||
* @returns Promise for the results of running aXe.
|
||||
*/
|
||||
export type JestAxe = (html: string, options?: AxeOptions) => Promise<AxeResults>;
|
||||
export type JestAxe = (
|
||||
html: Element | string,
|
||||
options?: AxeOptions,
|
||||
) => Promise<AxeResults>;
|
||||
|
||||
/**
|
||||
* Creates a new aXe verifier function.
|
||||
|
||||
@ -17,3 +17,4 @@ const newJestWithOptions: JestAxe = configureAxe({
|
||||
const sameJest: JestAxe = axe;
|
||||
|
||||
expect("").toHaveNoViolations();
|
||||
expect(document.body).toHaveNoViolations();
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user