@efebia/jest-match-response 0.0.4 → 0.0.5

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/lib/index.d.ts CHANGED
@@ -6,4 +6,4 @@ export declare const matchResponseAndReturn: (response: {
6
6
  status: number;
7
7
  } | {
8
8
  statusCode: number;
9
- }), model: any) => Promise<any>;
9
+ }), statusCode: number, model: any) => Promise<any>;
package/lib/index.js CHANGED
@@ -5,12 +5,12 @@ var toMatchJson_1 = require("./toMatchJson");
5
5
  Object.defineProperty(exports, "buildToMatchJson", { enumerable: true, get: function () { return toMatchJson_1.buildToMatchJson; } });
6
6
  var toMatchResponse_1 = require("./toMatchResponse");
7
7
  Object.defineProperty(exports, "toMatchResponse", { enumerable: true, get: function () { return toMatchResponse_1.toMatchResponse; } });
8
- const matchResponseAndReturn = async (response, model) => {
8
+ const matchResponseAndReturn = async (response, statusCode, model) => {
9
9
  const jsonValue = await response.json();
10
10
  expect({ ...response, json() {
11
11
  return jsonValue;
12
12
  } })
13
- .toMatchResponse(model);
13
+ .toMatchResponse(statusCode, model);
14
14
  return jsonValue;
15
15
  };
16
16
  exports.matchResponseAndReturn = matchResponseAndReturn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@efebia/jest-match-response",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "license": "MIT",
5
5
  "devDependencies": {
6
6
  "@types/jest": "^29.2.5",