@dereekb/vitest 13.12.7 → 13.12.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import * as matchers from 'vitest-axe/matchers.js';
|
|
2
1
|
import type AxeCore from 'axe-core';
|
|
3
2
|
export type { AxeMatchers } from 'vitest-axe/matchers.js';
|
|
4
|
-
/**
|
|
5
|
-
* Object or wrapper that exposes a native DOM element, such as Angular's `ComponentFixture`.
|
|
6
|
-
*/
|
|
7
|
-
export interface NativeElementRef {
|
|
8
|
-
readonly nativeElement: Element;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Input accepted by a11y helpers: a raw DOM element or any object exposing `nativeElement`.
|
|
12
|
-
*/
|
|
13
|
-
export type A11yTestTarget = Element | NativeElementRef;
|
|
14
3
|
/**
|
|
15
4
|
* All vitest-axe matchers, ready to register via `expect.extend()`.
|
|
16
5
|
*
|
|
@@ -23,7 +12,17 @@ export type A11yTestTarget = Element | NativeElementRef;
|
|
|
23
12
|
* expect(results).toHaveNoViolations();
|
|
24
13
|
* ```
|
|
25
14
|
*/
|
|
26
|
-
export
|
|
15
|
+
export * as allA11yMatchers from 'vitest-axe/matchers.js';
|
|
16
|
+
/**
|
|
17
|
+
* Object or wrapper that exposes a native DOM element, such as Angular's `ComponentFixture`.
|
|
18
|
+
*/
|
|
19
|
+
export interface NativeElementRef {
|
|
20
|
+
readonly nativeElement: Element;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Input accepted by a11y helpers: a raw DOM element or any object exposing `nativeElement`.
|
|
24
|
+
*/
|
|
25
|
+
export type A11yTestTarget = Element | NativeElementRef;
|
|
27
26
|
/**
|
|
28
27
|
* Runs axe-core on a target element and asserts zero accessibility violations.
|
|
29
28
|
*
|
package/src/lib/matcher.a11y.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { expect } from 'vitest';
|
|
2
|
-
import * as matchers from 'vitest-axe/matchers.js';
|
|
3
2
|
import { axe } from 'vitest-axe';
|
|
4
|
-
function resolveElement(target) {
|
|
5
|
-
return 'nativeElement' in target ? target.nativeElement : target;
|
|
6
|
-
}
|
|
7
3
|
/**
|
|
8
4
|
* All vitest-axe matchers, ready to register via `expect.extend()`.
|
|
9
5
|
*
|
|
@@ -16,7 +12,10 @@ function resolveElement(target) {
|
|
|
16
12
|
* expect(results).toHaveNoViolations();
|
|
17
13
|
* ```
|
|
18
14
|
*/
|
|
19
|
-
export
|
|
15
|
+
export * as allA11yMatchers from 'vitest-axe/matchers.js';
|
|
16
|
+
function resolveElement(target) {
|
|
17
|
+
return 'nativeElement' in target ? target.nativeElement : target;
|
|
18
|
+
}
|
|
20
19
|
/**
|
|
21
20
|
* Runs axe-core on a target element and asserts zero accessibility violations.
|
|
22
21
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matcher.a11y.js","sourceRoot":"","sources":["../../../../../packages/vitest/src/lib/matcher.a11y.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,
|
|
1
|
+
{"version":3,"file":"matcher.a11y.js","sourceRoot":"","sources":["../../../../../packages/vitest/src/lib/matcher.a11y.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAKjC;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAc1D,SAAS,cAAc,CAAC,MAAsB;IAC5C,OAAO,eAAe,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;AACnE,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,MAAsB,EAAE,OAA4B;IAC/F,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3D,MAAM,CAAC,OAAO,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACvC,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAsB,EAAE,OAA4B;IACvF,OAAO,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC"}
|