@nocobase/test 1.4.15 → 1.4.17
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/es/index.mjs
CHANGED
|
@@ -42,8 +42,8 @@ class MockServer extends Application {
|
|
|
42
42
|
Gateway.getInstance().destroy();
|
|
43
43
|
await AppSupervisor.getInstance().destroy();
|
|
44
44
|
}
|
|
45
|
-
agent() {
|
|
46
|
-
const agent = supertest.agent(this.callback());
|
|
45
|
+
agent(callback) {
|
|
46
|
+
const agent = supertest.agent(callback || this.callback());
|
|
47
47
|
const prefix = this.resourcer.options.prefix;
|
|
48
48
|
const proxy = new Proxy(agent, {
|
|
49
49
|
get(target, method, receiver) {
|
|
@@ -68,7 +68,7 @@ export declare class MockServer extends Application {
|
|
|
68
68
|
clean?: boolean;
|
|
69
69
|
}): Promise<void>;
|
|
70
70
|
destroy(options?: any): Promise<void>;
|
|
71
|
-
agent(): ExtendedAgent;
|
|
71
|
+
agent(callback?: any): ExtendedAgent;
|
|
72
72
|
protected createDatabase(options: ApplicationOptions): import("@nocobase/database").MockDatabase;
|
|
73
73
|
}
|
|
74
74
|
export declare function mockServer(options?: ApplicationOptions): MockServer;
|
|
@@ -68,7 +68,7 @@ export declare class MockServer extends Application {
|
|
|
68
68
|
clean?: boolean;
|
|
69
69
|
}): Promise<void>;
|
|
70
70
|
destroy(options?: any): Promise<void>;
|
|
71
|
-
agent(): ExtendedAgent;
|
|
71
|
+
agent(callback?: any): ExtendedAgent;
|
|
72
72
|
protected createDatabase(options: ApplicationOptions): import("@nocobase/database").MockDatabase;
|
|
73
73
|
}
|
|
74
74
|
export declare function mockServer(options?: ApplicationOptions): MockServer;
|
|
@@ -80,8 +80,8 @@ const _MockServer = class _MockServer extends import_server.Application {
|
|
|
80
80
|
import_server.Gateway.getInstance().destroy();
|
|
81
81
|
await import_server.AppSupervisor.getInstance().destroy();
|
|
82
82
|
}
|
|
83
|
-
agent() {
|
|
84
|
-
const agent = import_supertest.default.agent(this.callback());
|
|
83
|
+
agent(callback) {
|
|
84
|
+
const agent = import_supertest.default.agent(callback || this.callback());
|
|
85
85
|
const prefix = this.resourcer.options.prefix;
|
|
86
86
|
const proxy = new Proxy(agent, {
|
|
87
87
|
get(target, method, receiver) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/test",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.17",
|
|
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": "1.4.
|
|
54
|
+
"@nocobase/server": "1.4.17",
|
|
55
55
|
"@playwright/test": "^1.45.3",
|
|
56
56
|
"@testing-library/jest-dom": "^6.4.2",
|
|
57
57
|
"@testing-library/react": "^14.0.0",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"vitest-dom": "^0.1.1",
|
|
77
77
|
"ws": "^8.13.0"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "fbb23b74bdff489afea67e1f3c9a917dd0a836b7"
|
|
80
80
|
}
|