@testspectra/react 1.1.8-rc.23 → 1.1.8-rc.25
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/dist/setup.js +7 -5
- package/package.json +2 -2
package/dist/setup.js
CHANGED
|
@@ -79,10 +79,10 @@ function createMockHandle(rule) {
|
|
|
79
79
|
throw new Error("Spectra.intercept() is not supported in component testing mode.");
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
handle.callCount = Object.assign(
|
|
83
|
-
() => rule.callCount,
|
|
84
|
-
|
|
85
|
-
);
|
|
82
|
+
handle.callCount = Object.assign(() => rule.callCount, {
|
|
83
|
+
valueOf: () => rule.callCount,
|
|
84
|
+
[Symbol.toPrimitive]: () => rule.callCount
|
|
85
|
+
});
|
|
86
86
|
Object.defineProperty(handle, "calls", { get: () => rule.calls, enumerable: true });
|
|
87
87
|
return handle;
|
|
88
88
|
}
|
|
@@ -862,7 +862,9 @@ function createCollectionProxy(selector) {
|
|
|
862
862
|
return actual < expected;
|
|
863
863
|
}, options?.timeoutMs ?? globalThis.__TS_RUNTIME__.getAssertionTimeoutMs());
|
|
864
864
|
if (!ok) {
|
|
865
|
-
throw new Error(
|
|
865
|
+
throw new Error(
|
|
866
|
+
`Expected collection "${selectorTextValue}" count to be less than ${expected}, but got ${actual}`
|
|
867
|
+
);
|
|
866
868
|
}
|
|
867
869
|
}
|
|
868
870
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testspectra/react",
|
|
3
|
-
"version": "1.1.8-rc.
|
|
3
|
+
"version": "1.1.8-rc.25",
|
|
4
4
|
"description": "Bundled Vitest browser-mode runner for React component testing with the TestSpectra Spectra.* DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"testspectra",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"cross-spawn": "^7.0.6",
|
|
42
42
|
"playwright": "^1.48.0",
|
|
43
43
|
"vitest": "^2.1.8",
|
|
44
|
-
"@testspectra/matchers": "1.1.8-rc.
|
|
44
|
+
"@testspectra/matchers": "1.1.8-rc.25"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": ">=18.0.0",
|