express-zod-api 5.0.0 → 5.1.0-beta1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  ## Version 5
4
4
 
5
+ ### v5.1.0-beta1
6
+
7
+ - Feature #252: a helper method for testing your endpoints: `testEndpoint()`.
8
+ - Requires `jest` (and optionally `@types/jest`) to be installed.
9
+ - The method helps to mock the request, response, config and logger required to execute the endpoint.
10
+ - The method executes the endpoint and returns the created mocks.
11
+ - After that you only need to assert your expectations in the test.
12
+
13
+ ```typescript
14
+ import { testEndpoint } from "express-zod-api";
15
+
16
+ test("should respond successfully", async () => {
17
+ const { responseMock, loggerMock } = await testEndpoint({
18
+ endpoint: yourEndpoint,
19
+ requestProps: {
20
+ method: "POST",
21
+ body: { ... },
22
+ },
23
+ });
24
+ expect(loggerMock.error).toBeCalledTimes(0);
25
+ expect(responseMock.status).toBeCalledWith(200);
26
+ expect(responseMock.json).toBeCalledWith({
27
+ status: "success",
28
+ data: { ... },
29
+ });
30
+ });
31
+ ```
32
+
5
33
  ### v5.0.0
6
34
 
7
35
  - No changes.
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export { createServer, attachRouting } from "./server";
12
12
  export { OpenAPI } from "./open-api";
13
13
  export { OpenAPIError, DependsOnMethodError, RoutingError } from "./errors";
14
14
  export { withMeta } from "./metadata";
15
+ export { testEndpoint } from "./mock";
15
16
  import * as z from "./extend-zod";
16
17
  import createHttpError from "http-errors";
17
18
  export { createHttpError, z };
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
22
22
  return (mod && mod.__esModule) ? mod : { "default": mod };
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.z = exports.createHttpError = exports.withMeta = exports.RoutingError = exports.DependsOnMethodError = exports.OpenAPIError = exports.OpenAPI = exports.attachRouting = exports.createServer = exports.DependsOnMethod = exports.defaultResultHandler = exports.createResultHandler = exports.createMiddleware = exports.createLogger = exports.createApiResponse = exports.markOutput = exports.defaultEndpointsFactory = exports.EndpointsFactory = exports.AbstractEndpoint = exports.createConfig = void 0;
25
+ exports.z = exports.createHttpError = exports.testEndpoint = exports.withMeta = exports.RoutingError = exports.DependsOnMethodError = exports.OpenAPIError = exports.OpenAPI = exports.attachRouting = exports.createServer = exports.DependsOnMethod = exports.defaultResultHandler = exports.createResultHandler = exports.createMiddleware = exports.createLogger = exports.createApiResponse = exports.markOutput = exports.defaultEndpointsFactory = exports.EndpointsFactory = exports.AbstractEndpoint = exports.createConfig = void 0;
26
26
  var config_type_1 = require("./config-type");
27
27
  Object.defineProperty(exports, "createConfig", { enumerable: true, get: function () { return config_type_1.createConfig; } });
28
28
  var endpoint_1 = require("./endpoint");
@@ -54,6 +54,8 @@ Object.defineProperty(exports, "DependsOnMethodError", { enumerable: true, get:
54
54
  Object.defineProperty(exports, "RoutingError", { enumerable: true, get: function () { return errors_1.RoutingError; } });
55
55
  var metadata_1 = require("./metadata");
56
56
  Object.defineProperty(exports, "withMeta", { enumerable: true, get: function () { return metadata_1.withMeta; } });
57
+ var mock_1 = require("./mock");
58
+ Object.defineProperty(exports, "testEndpoint", { enumerable: true, get: function () { return mock_1.testEndpoint; } });
57
59
  const z = __importStar(require("./extend-zod"));
58
60
  exports.z = z;
59
61
  const http_errors_1 = __importDefault(require("http-errors"));
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2D;AAAlD,2GAAA,YAAY,OAAA;AACrB,uCAKoB;AAJlB,4GAAA,gBAAgB,OAAA;AAMlB,yDAAgF;AAAvE,qHAAA,gBAAgB,OAAA;AAAE,4HAAA,uBAAuB,OAAA;AAClD,mDAAoE;AAArC,4GAAA,UAAU,OAAA;AACzC,+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AA,oBAAoB,OAAA;AAAE,sGAAA,YAAY,OAAA;AACzD,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,+BAAsC;AAA7B,oGAAA,YAAY,OAAA;AAErB,gDAAkC;AAGR,cAAC;AAF3B,8DAA0C;AAEjC,0BAFF,qBAAe,CAEE"}
package/dist/mock.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ /// <reference types="qs" />
2
+ /// <reference types="jest" />
3
+ import { Request, Response } from "express";
4
+ import { Logger } from "winston";
5
+ import { CommonConfig } from "./config-type";
6
+ import { AbstractEndpoint } from "./endpoint";
7
+ interface TestEndpointProps<REQ, RES, LOG> {
8
+ endpoint: AbstractEndpoint;
9
+ requestProps?: REQ;
10
+ responseProps?: RES;
11
+ configProps?: Partial<CommonConfig>;
12
+ loggerProps?: LOG;
13
+ /** @deprecated for testing purposes only */
14
+ __noJest?: boolean;
15
+ }
16
+ /**
17
+ * @description You need to install Jest and probably @types/jest to use this method
18
+ */
19
+ export declare const testEndpoint: <REQ extends Partial<Record<keyof Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, any>> | undefined = undefined, RES extends Partial<Record<keyof Response<any, Record<string, any>>, any>> | undefined = undefined, LOG extends Partial<Record<keyof Logger, any>> | undefined = undefined>({ endpoint, requestProps, responseProps, configProps, loggerProps, __noJest, }: TestEndpointProps<REQ, RES, LOG>) => Promise<{
20
+ requestMock: {
21
+ method: string;
22
+ } & Record<"header", jest.Mock<any, any>> & (REQ extends undefined ? {} : REQ);
23
+ responseMock: {
24
+ writableEnded: boolean;
25
+ statusCode: number;
26
+ statusMessage: string;
27
+ } & Record<"json" | "status" | "set" | "end", jest.Mock<any, any>> & (RES extends undefined ? {} : RES);
28
+ loggerMock: Record<"error" | "warn" | "debug" | "info", jest.Mock<any, any>> & (LOG extends undefined ? {} : LOG);
29
+ }>;
30
+ export {};
package/dist/mock.js ADDED
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.testEndpoint = void 0;
4
+ const index_1 = require("./index");
5
+ const mime_1 = require("./mime");
6
+ /**
7
+ * @description You need to install Jest and probably @types/jest to use this method
8
+ */
9
+ const testEndpoint = async ({ endpoint, requestProps, responseProps, configProps, loggerProps, __noJest, }) => {
10
+ if (!jest || __noJest) {
11
+ throw new Error("You need to install Jest in order to use testEndpoint().");
12
+ }
13
+ const requestMock = {
14
+ method: "GET",
15
+ header: jest.fn(() => mime_1.mimeJson),
16
+ ...requestProps,
17
+ };
18
+ const responseMock = {
19
+ writableEnded: false,
20
+ statusCode: 200,
21
+ statusMessage: (0, index_1.createHttpError)(200).message,
22
+ set: jest.fn(() => responseMock),
23
+ status: jest.fn((value) => {
24
+ responseMock.statusCode = value;
25
+ responseMock.statusMessage = (0, index_1.createHttpError)(value).message;
26
+ return responseMock;
27
+ }),
28
+ json: jest.fn(() => responseMock),
29
+ end: jest.fn(() => {
30
+ responseMock.writableEnded = true;
31
+ return responseMock;
32
+ }),
33
+ ...responseProps,
34
+ };
35
+ const loggerMock = {
36
+ info: jest.fn(),
37
+ warn: jest.fn(),
38
+ error: jest.fn(),
39
+ debug: jest.fn(),
40
+ ...loggerProps,
41
+ };
42
+ const configMock = {
43
+ cors: false,
44
+ logger: loggerMock,
45
+ ...configProps,
46
+ };
47
+ await endpoint.execute({
48
+ request: requestMock,
49
+ response: responseMock,
50
+ config: configMock,
51
+ logger: loggerMock,
52
+ });
53
+ return { requestMock, responseMock, loggerMock };
54
+ };
55
+ exports.testEndpoint = testEndpoint;
56
+ //# sourceMappingURL=mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock.js","sourceRoot":"","sources":["../src/mock.ts"],"names":[],"mappings":";;;AAIA,mCAA0C;AAC1C,iCAAkC;AAYlC;;GAEG;AACI,MAAM,YAAY,GAAG,KAAK,EAI/B,EACA,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,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ClB,GAAG,WAAW;KACf,CAAC;IACF,MAAM,QAAQ,CAAC,OAAO,CAAC;QACrB,OAAO,EAAE,WAAiC;QAC1C,QAAQ,EAAE,YAAmC;QAC7C,MAAM,EAAE,UAA0B;QAClC,MAAM,EAAE,UAA+B;KACxC,CAAC,CAAC;IACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AACnD,CAAC,CAAC;AArEW,QAAA,YAAY,gBAqEvB"}
package/dist-esm/index.js CHANGED
@@ -11,6 +11,7 @@ export { createServer, attachRouting } from "./server.js";
11
11
  export { OpenAPI } from "./open-api.js";
12
12
  export { OpenAPIError, DependsOnMethodError, RoutingError } from "./errors.js";
13
13
  export { withMeta } from "./metadata.js";
14
+ export { testEndpoint } from "./mock.js";
14
15
  import * as z from "./extend-zod.js";
15
16
  import createHttpError from "http-errors";
16
17
  export { createHttpError, z };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,MAAM,eAAe,CAAC;AAC3D,OAAO,EACL,gBAAgB,GAIjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAwB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAW,eAAe,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,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@
1
+ import { createHttpError } from "./index.js";
2
+ import { mimeJson } from "./mime.js";
3
+ /**
4
+ * @description You need to install Jest and probably @types/jest to use this method
5
+ */
6
+ export const testEndpoint = async ({ endpoint, requestProps, responseProps, configProps, loggerProps, __noJest, }) => {
7
+ if (!jest || __noJest) {
8
+ throw new Error("You need to install Jest in order to use testEndpoint().");
9
+ }
10
+ const requestMock = {
11
+ method: "GET",
12
+ header: jest.fn(() => mimeJson),
13
+ ...requestProps,
14
+ };
15
+ const responseMock = {
16
+ writableEnded: false,
17
+ statusCode: 200,
18
+ statusMessage: createHttpError(200).message,
19
+ set: jest.fn(() => responseMock),
20
+ status: jest.fn((value) => {
21
+ responseMock.statusCode = value;
22
+ responseMock.statusMessage = createHttpError(value).message;
23
+ return responseMock;
24
+ }),
25
+ json: jest.fn(() => responseMock),
26
+ end: jest.fn(() => {
27
+ responseMock.writableEnded = true;
28
+ return responseMock;
29
+ }),
30
+ ...responseProps,
31
+ };
32
+ const loggerMock = {
33
+ info: jest.fn(),
34
+ warn: jest.fn(),
35
+ error: jest.fn(),
36
+ debug: jest.fn(),
37
+ ...loggerProps,
38
+ };
39
+ const configMock = {
40
+ cors: false,
41
+ logger: loggerMock,
42
+ ...configProps,
43
+ };
44
+ await endpoint.execute({
45
+ request: requestMock,
46
+ response: responseMock,
47
+ config: configMock,
48
+ logger: loggerMock,
49
+ });
50
+ return { requestMock, responseMock, loggerMock };
51
+ };
52
+ //# sourceMappingURL=mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock.js","sourceRoot":"","sources":["../src/mock.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAYlC;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAI/B,EACA,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,GACyB,E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AAC;IACF,MAAM,QAAQ,CAAC,OAAO,CAAC;QACrB,OAAO,EAAE,WAAiC;QAC1C,QAAQ,EAAE,YAAmC;QAC7C,MAAM,EAAE,UAA0B;QAClC,MAAM,EAAE,UAA+B;KACxC,CAAC,CAAC;IACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AACnD,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"type":"module","version":"5.0.0"}
1
+ {"type":"module","version":"5.1.0-beta1"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-zod-api",
3
- "version": "5.0.0",
3
+ "version": "5.1.0-beta1",
4
4
  "description": "A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -44,6 +44,18 @@
44
44
  "winston": "3.3.3",
45
45
  "zod": "3.11.6"
46
46
  },
47
+ "peerDependencies": {
48
+ "jest": ">=25 <28",
49
+ "@types/jest": "*"
50
+ },
51
+ "peerDependenciesMeta": {
52
+ "jest": {
53
+ "optional": true
54
+ },
55
+ "@types/jest": {
56
+ "optional": true
57
+ }
58
+ },
47
59
  "devDependencies": {
48
60
  "@tsconfig/node12": "^1.0.9",
49
61
  "@types/express": "^4.17.13",