@teamkeel/testing-runtime 0.240.0 → 0.240.1
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 +1 -1
- package/src/toHaveError.mjs +4 -4
package/package.json
CHANGED
package/src/toHaveError.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import isMatch from
|
|
1
|
+
import isMatch from "lodash.ismatch";
|
|
2
2
|
|
|
3
3
|
export async function toHaveError(received, expected) {
|
|
4
4
|
const { isNot } = this;
|
|
@@ -7,9 +7,9 @@ export async function toHaveError(received, expected) {
|
|
|
7
7
|
|
|
8
8
|
return {
|
|
9
9
|
pass: false,
|
|
10
|
-
message: () =>
|
|
10
|
+
message: () => "expected value to reject",
|
|
11
11
|
actual: JSON.stringify(v),
|
|
12
|
-
expected: JSON.stringify(expected)
|
|
12
|
+
expected: JSON.stringify(expected),
|
|
13
13
|
};
|
|
14
14
|
} catch (err) {
|
|
15
15
|
return {
|
|
@@ -17,7 +17,7 @@ export async function toHaveError(received, expected) {
|
|
|
17
17
|
message: () =>
|
|
18
18
|
`expected ${isNot ? "no " : ""} ${JSON.stringify(err)} error`,
|
|
19
19
|
actual: JSON.stringify(err),
|
|
20
|
-
expected: JSON.stringify(expected)
|
|
20
|
+
expected: JSON.stringify(expected),
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
}
|