@homebound/truss 2.6.0 → 2.7.0
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/build/index.d.ts +0 -1
- package/build/index.js +16 -59
- package/build/index.js.map +1 -1
- package/build/plugin/index.js +6 -2
- package/build/plugin/index.js.map +1 -1
- package/build/vitest.d.ts +23 -3
- package/package.json +1 -1
- package/build/toHaveStyle-Y8DGA4JF.d.ts +0 -24
package/build/vitest.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/** Supported style expectations for the matcher. */
|
|
2
|
+
type StyleExpectation = string | Record<string, string | number>;
|
|
3
|
+
/** Minimal subset of Vitest's matcher context used for error formatting. */
|
|
4
|
+
type MatcherContext = {
|
|
5
|
+
utils?: {
|
|
6
|
+
printExpected?: (value: unknown) => string;
|
|
7
|
+
printReceived?: (value: unknown) => string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
/** Standard matcher result shape returned to Vitest. */
|
|
11
|
+
type MatcherResult = {
|
|
12
|
+
pass: boolean;
|
|
13
|
+
message: () => string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Assert that an element's computed style matches the provided CSS declarations.
|
|
17
|
+
*
|
|
18
|
+
* Static class-based styles are read via `getComputedStyle`, while CSS custom
|
|
19
|
+
* properties are read directly from the element's inline style because jsdom
|
|
20
|
+
* does not resolve them through computed styles.
|
|
21
|
+
*/
|
|
22
|
+
declare function toHaveStyle(this: MatcherContext, received: unknown, expected: StyleExpectation): MatcherResult;
|
|
3
23
|
|
|
4
24
|
declare module "vitest" {
|
|
5
25
|
interface Assertion<T = any> {
|
|
@@ -10,4 +30,4 @@ declare module "vitest" {
|
|
|
10
30
|
}
|
|
11
31
|
}
|
|
12
32
|
|
|
13
|
-
export { StyleExpectation };
|
|
33
|
+
export { type StyleExpectation, toHaveStyle };
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** Supported style expectations for the matcher. */
|
|
2
|
-
type StyleExpectation = string | Record<string, string | number>;
|
|
3
|
-
/** Minimal subset of Vitest's matcher context used for error formatting. */
|
|
4
|
-
type MatcherContext = {
|
|
5
|
-
utils?: {
|
|
6
|
-
printExpected?: (value: unknown) => string;
|
|
7
|
-
printReceived?: (value: unknown) => string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
/** Standard matcher result shape returned to Vitest. */
|
|
11
|
-
type MatcherResult = {
|
|
12
|
-
pass: boolean;
|
|
13
|
-
message: () => string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Assert that an element's computed style matches the provided CSS declarations.
|
|
17
|
-
*
|
|
18
|
-
* Static class-based styles are read via `getComputedStyle`, while CSS custom
|
|
19
|
-
* properties are read directly from the element's inline style because jsdom
|
|
20
|
-
* does not resolve them through computed styles.
|
|
21
|
-
*/
|
|
22
|
-
declare function toHaveStyle(this: MatcherContext, received: unknown, expected: StyleExpectation): MatcherResult;
|
|
23
|
-
|
|
24
|
-
export { type StyleExpectation as S, toHaveStyle as t };
|