@nocobase/test 2.0.0-alpha.55 → 2.0.0-alpha.57

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.
@@ -7,7 +7,8 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { Application, ApplicationOptions } from '@nocobase/server';
10
- import supertest, { SuperAgentTest } from 'supertest';
10
+ import supertest from 'supertest';
11
+ import { SuperAgent, SuperAgentRequest } from 'superagent';
11
12
  interface ActionParams {
12
13
  filterByTk?: any;
13
14
  fields?: string[];
@@ -56,7 +57,7 @@ interface Resource {
56
57
  sort: (params?: SortActionParams) => Promise<supertest.Response>;
57
58
  [name: string]: (params?: ActionParams) => Promise<supertest.Response>;
58
59
  }
59
- export interface ExtendedAgent extends SuperAgentTest {
60
+ export interface ExtendedAgent extends SuperAgent<SuperAgentRequest> {
60
61
  login: (user: any, roleName?: string) => Promise<ExtendedAgent>;
61
62
  loginUsingId: (userId: number, roleName?: string) => Promise<ExtendedAgent>;
62
63
  resource: (name: string, resourceOf?: any) => Resource;
@@ -7,7 +7,8 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { Application, ApplicationOptions } from '@nocobase/server';
10
- import supertest, { SuperAgentTest } from 'supertest';
10
+ import supertest from 'supertest';
11
+ import { SuperAgent, SuperAgentRequest } from 'superagent';
11
12
  interface ActionParams {
12
13
  filterByTk?: any;
13
14
  fields?: string[];
@@ -56,7 +57,7 @@ interface Resource {
56
57
  sort: (params?: SortActionParams) => Promise<supertest.Response>;
57
58
  [name: string]: (params?: ActionParams) => Promise<supertest.Response>;
58
59
  }
59
- export interface ExtendedAgent extends SuperAgentTest {
60
+ export interface ExtendedAgent extends SuperAgent<SuperAgentRequest> {
60
61
  login: (user: any, roleName?: string) => Promise<ExtendedAgent>;
61
62
  loginUsingId: (userId: number, roleName?: string) => Promise<ExtendedAgent>;
62
63
  resource: (name: string, resourceOf?: any) => Resource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/test",
3
- "version": "2.0.0-alpha.55",
3
+ "version": "2.0.0-alpha.57",
4
4
  "main": "lib/index.js",
5
5
  "module": "./src/index.ts",
6
6
  "types": "./lib/index.d.ts",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@faker-js/faker": "8.1.0",
54
- "@nocobase/server": "2.0.0-alpha.55",
54
+ "@nocobase/server": "2.0.0-alpha.57",
55
55
  "@playwright/test": "^1.45.3",
56
56
  "@testing-library/jest-dom": "^6.4.2",
57
57
  "@testing-library/react": "^14.0.0",
@@ -75,5 +75,5 @@
75
75
  "vitest-dom": "^0.1.1",
76
76
  "ws": "^8.13.0"
77
77
  },
78
- "gitHead": "7e65ad6b6e4e76a51f82c69b04b563fbcc7e1c25"
78
+ "gitHead": "b9ec8bc83fd86a9cadfc4fb2f87a4e015061b289"
79
79
  }