@types/jest-axe
Advanced tools
Comparing version 3.5.1 to 3.5.2
@@ -13,3 +13,3 @@ // Type definitions for jest-axe 3.5 | ||
export interface JestAxeConfigureOptions extends RunOptions { | ||
globalOptions?: Spec; | ||
globalOptions?: Spec | undefined; | ||
} | ||
@@ -16,0 +16,0 @@ |
{ | ||
"name": "@types/jest-axe", | ||
"version": "3.5.1", | ||
"version": "3.5.2", | ||
"description": "TypeScript definitions for jest-axe", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-axe", | ||
"license": "MIT", | ||
@@ -30,4 +31,4 @@ "contributors": [ | ||
}, | ||
"typesPublisherContentHash": "791223d9a8b241879f832b32c49b7009c548beab3e7535283eeb356cea10dcd0", | ||
"typesPublisherContentHash": "9c1df4500ba37d88440ea5c0d66f1fba1331db2e2178022d4d37fb766b539793", | ||
"typeScriptVersion": "3.8" | ||
} |
@@ -9,5 +9,91 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-axe. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-axe/index.d.ts) | ||
````ts | ||
// Type definitions for jest-axe 3.5 | ||
// Project: https://github.com/nickcolley/jest-axe | ||
// Definitions by: Josh Goldberg <https://github.com/JoshuaKGoldberg> | ||
// erbridge <https://github.com/erbridge> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 3.8 | ||
/// <reference types="jest" /> | ||
import { AxeResults, Result, RunOptions, Spec } from 'axe-core'; | ||
export interface JestAxeConfigureOptions extends RunOptions { | ||
globalOptions?: Spec | undefined; | ||
} | ||
/** | ||
* Version of the aXe verifier with defaults set. | ||
* | ||
* @remarks You can still pass additional options to this new instance; | ||
* they will be merged with the defaults. | ||
*/ | ||
export const axe: JestAxe; | ||
/** | ||
* Runs aXe on HTML. | ||
* | ||
* @param html Raw HTML string to verify with aXe. | ||
* @param options Options to run aXe. | ||
* @returns Promise for the results of running aXe. | ||
*/ | ||
export type JestAxe = (html: Element | string, options?: RunOptions) => Promise<AxeResults>; | ||
/** | ||
* Creates a new aXe verifier function. | ||
* | ||
* @param options Options to run aXe. | ||
* @returns New aXe verifier function. | ||
*/ | ||
export function configureAxe(options?: JestAxeConfigureOptions): JestAxe; | ||
/** | ||
* Results from asserting whether aXe verification passed. | ||
*/ | ||
export interface AssertionsResult { | ||
/** | ||
* Actual checked aXe verification results. | ||
*/ | ||
actual: Result[]; | ||
/** | ||
* @returns Message from the Jest assertion. | ||
*/ | ||
message(): string; | ||
/** | ||
* Whether the assertion passed. | ||
*/ | ||
pass: boolean; | ||
} | ||
/** | ||
* Asserts an aXe-verified result has no violations. | ||
* | ||
* @param results aXe verification result, if not running via expect(). | ||
* @returns Jest expectations for the aXe result. | ||
*/ | ||
export type IToHaveNoViolations = (results?: Partial<AxeResults>) => AssertionsResult; | ||
export const toHaveNoViolations: { | ||
toHaveNoViolations: IToHaveNoViolations; | ||
}; | ||
declare global { | ||
namespace jest { | ||
interface Matchers<R, T> { | ||
toHaveNoViolations(): R; | ||
} | ||
} | ||
// axe-core depends on a global Node | ||
interface Node {} | ||
} | ||
```` | ||
### Additional Details | ||
* Last updated: Tue, 20 Oct 2020 07:15:43 GMT | ||
* Last updated: Tue, 06 Jul 2021 21:33:43 GMT | ||
* Dependencies: [@types/axe-core](https://npmjs.com/package/@types/axe-core), [@types/jest](https://npmjs.com/package/@types/jest) | ||
@@ -14,0 +100,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
7146
0
103