@tramvai/test-unit 2.22.0 → 2.24.0

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.
@@ -19,6 +19,6 @@ declare type Options = Partial<Parameters<typeof createApp>[0]> & {
19
19
  export declare const createTestApp: ({ name, bundles, providers, modules, actions, env, excludeDefaultModules, }?: Options) => Promise<{
20
20
  app: import("@tramvai/core").App;
21
21
  mocker: import("@tinkoff/mocker").Mocker | null;
22
- close: () => import("http").Server;
22
+ close: () => import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
23
23
  }>;
24
24
  export {};
@@ -7,13 +7,11 @@ import type { App } from '@tramvai/core';
7
7
  */
8
8
  export declare const testApp: (appOrAppPromise: App | Promise<App>) => Promise<{
9
9
  app: App;
10
- request: (path: string, { method, body, contentType, }?: {
11
- method?: "get" | "post" | "put" | undefined;
10
+ request: (path: string, { method, body, contentType, headers, }?: {
11
+ method?: "get" | "post" | "put" | "delete" | undefined;
12
12
  body?: Record<string, any> | undefined;
13
- contentType?: "json" | "form" | undefined; /**
14
- * Позволяет протестировать уже созданное через createApp приложение
15
- * @param appOrAppPromise результат вызова createApp
16
- */
13
+ contentType?: "json" | "form" | undefined;
14
+ headers?: Record<string, string> | undefined;
17
15
  } | undefined) => import("supertest").Test;
18
16
  render: (path: string, { method, parserOptions, }?: {
19
17
  method?: "get" | "post" | "put" | undefined;
@@ -26,6 +24,6 @@ export declare const testApp: (appOrAppPromise: App | Promise<App>) => Promise<{
26
24
  application: string;
27
25
  }>;
28
26
  mocker: import("@tinkoff/mocker").Mocker | null;
29
- close: () => import("http").Server;
27
+ close: () => import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
30
28
  }>;
31
29
  export declare type TestAppResult = PromiseType<ReturnType<typeof testApp>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/test-unit",
3
- "version": "2.22.0",
3
+ "version": "2.24.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -18,21 +18,21 @@
18
18
  "build-for-publish": "true"
19
19
  },
20
20
  "dependencies": {
21
- "@tramvai/cli": "2.22.0",
22
- "@tramvai/core": "2.22.0",
23
- "@tramvai/module-common": "2.22.0",
24
- "@tramvai/module-log": "2.22.0",
25
- "@tramvai/module-metrics": "2.22.0",
26
- "@tramvai/module-mocker": "2.22.0",
27
- "@tramvai/module-render": "2.22.0",
28
- "@tramvai/module-router": "2.22.0",
29
- "@tramvai/module-server": "2.22.0",
30
- "@tramvai/state": "2.22.0",
31
- "@tramvai/test-helpers": "2.22.0",
32
- "@tramvai/test-mocks": "2.22.0",
33
- "@tramvai/tokens-common": "2.22.0",
34
- "@tramvai/tokens-server": "2.22.0",
35
- "@tramvai/tokens-server-private": "2.22.0",
21
+ "@tramvai/cli": "2.24.0",
22
+ "@tramvai/core": "2.24.0",
23
+ "@tramvai/module-common": "2.24.0",
24
+ "@tramvai/module-log": "2.24.0",
25
+ "@tramvai/module-metrics": "2.24.0",
26
+ "@tramvai/module-mocker": "2.24.0",
27
+ "@tramvai/module-render": "2.24.0",
28
+ "@tramvai/module-router": "2.24.0",
29
+ "@tramvai/module-server": "2.24.0",
30
+ "@tramvai/state": "2.24.0",
31
+ "@tramvai/test-helpers": "2.24.0",
32
+ "@tramvai/test-mocks": "2.24.0",
33
+ "@tramvai/tokens-common": "2.24.0",
34
+ "@tramvai/tokens-server": "2.24.0",
35
+ "@tramvai/tokens-server-private": "2.24.0",
36
36
  "utility-types": "^3.10.0"
37
37
  },
38
38
  "peerDependencies": {