@teamkeel/testing-runtime 0.239.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/testing-runtime",
3
- "version": "0.239.0",
3
+ "version": "0.240.1",
4
4
  "description": "Internal package used by the generated @teamkeel/testing package",
5
5
  "exports": "./src/index.mjs",
6
6
  "typings": "src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -8,7 +8,7 @@ interface ActionError {
8
8
 
9
9
  interface CustomMatchers<R = unknown> {
10
10
  toHaveAuthorizationError(): void;
11
- toHaveError(err: ActionError): void;
11
+ toHaveError(err: Partial<ActionError>): void;
12
12
  }
13
13
 
14
14
  declare global {
@@ -1,4 +1,4 @@
1
- import isMatch from 'lodash.ismatch'
1
+ import isMatch from "lodash.ismatch";
2
2
 
3
3
  export async function toHaveError(received, expected) {
4
4
  const { isNot } = this;
@@ -7,17 +7,17 @@ export async function toHaveError(received, expected) {
7
7
 
8
8
  return {
9
9
  pass: false,
10
- message: () => 'expected value to reject',
11
- actual: v,
12
- expected
10
+ message: () => "expected value to reject",
11
+ actual: JSON.stringify(v),
12
+ expected: JSON.stringify(expected),
13
13
  };
14
14
  } catch (err) {
15
15
  return {
16
16
  pass: isMatch(err, expected),
17
17
  message: () =>
18
18
  `expected ${isNot ? "no " : ""} ${JSON.stringify(err)} error`,
19
- actual: err,
20
- expected
19
+ actual: JSON.stringify(err),
20
+ expected: JSON.stringify(expected),
21
21
  };
22
22
  }
23
23
  }