@acmekit/test-utils 2.13.37 → 2.13.39
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin-test-runner.d.ts +66 -0
- package/dist/plugin-test-runner.d.ts.map +1 -0
- package/dist/plugin-test-runner.js +339 -0
- package/dist/plugin-test-runner.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export * from "./acmekit-test-runner";
|
|
|
6
6
|
export * from "./acmekit-test-runner-utils";
|
|
7
7
|
export { default as MockEventBusService } from "./mock-event-bus-service";
|
|
8
8
|
export * from "./module-test-runner";
|
|
9
|
+
export * from "./plugin-test-runner";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,cAAc,MAAM,UAAU,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,cAAc,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,cAAc,MAAM,UAAU,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -49,4 +49,5 @@ __exportStar(require("./acmekit-test-runner-utils"), exports);
|
|
|
49
49
|
var mock_event_bus_service_1 = require("./mock-event-bus-service");
|
|
50
50
|
Object.defineProperty(exports, "MockEventBusService", { enumerable: true, get: function () { return __importDefault(mock_event_bus_service_1).default; } });
|
|
51
51
|
__exportStar(require("./module-test-runner"), exports);
|
|
52
|
+
__exportStar(require("./plugin-test-runner"), exports);
|
|
52
53
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAA+C;AAC/C,2DAA0C;AAC1C,iDAA8B;AAC9B,oDAAmC;AACnC,wDAAqC;AACrC,8DAA2C;AAC3C,mEAAyE;AAAhE,8IAAA,OAAO,OAAuB;AACvC,uDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAA+C;AAC/C,2DAA0C;AAC1C,iDAA8B;AAC9B,oDAAmC;AACnC,wDAAqC;AACrC,8DAA2C;AAC3C,mEAAyE;AAAhE,8IAAA,OAAO,OAAuB;AACvC,uDAAoC;AACpC,uDAAoC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { AcmeKitContainer } from "@acmekit/framework/types";
|
|
2
|
+
import { TestDatabase } from "./database";
|
|
3
|
+
export interface PluginSuiteOptions {
|
|
4
|
+
MikroOrmWrapper: TestDatabase;
|
|
5
|
+
container: AcmeKitContainer;
|
|
6
|
+
acmekitApp: any;
|
|
7
|
+
dbConfig: {
|
|
8
|
+
schema: string;
|
|
9
|
+
clientUrl: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
interface PluginTestRunnerConfig {
|
|
13
|
+
/**
|
|
14
|
+
* Path to the plugin package root (where package.json lives).
|
|
15
|
+
* Can be a relative path or an npm package name.
|
|
16
|
+
*/
|
|
17
|
+
pluginPath: string;
|
|
18
|
+
/**
|
|
19
|
+
* Plugin options to pass, simulating what a host app would
|
|
20
|
+
* configure in acmekit-config.ts.
|
|
21
|
+
*/
|
|
22
|
+
pluginOptions?: Record<string, unknown>;
|
|
23
|
+
/**
|
|
24
|
+
* Additional modules to load alongside the plugin.
|
|
25
|
+
* Useful when the plugin depends on other modules.
|
|
26
|
+
*/
|
|
27
|
+
additionalModules?: Record<string, any>;
|
|
28
|
+
/**
|
|
29
|
+
* Dependencies to inject into the container.
|
|
30
|
+
* Use this to mock services the plugin depends on.
|
|
31
|
+
*/
|
|
32
|
+
injectedDependencies?: Record<string, any>;
|
|
33
|
+
schema?: string;
|
|
34
|
+
dbName?: string;
|
|
35
|
+
debug?: boolean;
|
|
36
|
+
cwd?: string;
|
|
37
|
+
hooks?: {
|
|
38
|
+
beforePluginInit?: () => Promise<void>;
|
|
39
|
+
afterPluginInit?: (acmekitApp: any) => Promise<void>;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Test runner for plugins. Heavier than moduleIntegrationTestRunner
|
|
44
|
+
* (loads all plugin resources: modules, subscribers, workflows, jobs)
|
|
45
|
+
* but lighter than acmekitIntegrationTestRunner (no Express, no admin,
|
|
46
|
+
* no core flows).
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* pluginIntegrationTestRunner({
|
|
51
|
+
* pluginPath: "./path/to/my-plugin",
|
|
52
|
+
* pluginOptions: { apiKey: "test-key" },
|
|
53
|
+
* testSuite: ({ container, acmekitApp }) => {
|
|
54
|
+
* it("should load plugin modules", () => {
|
|
55
|
+
* const service = container.resolve("myModuleService")
|
|
56
|
+
* expect(service).toBeDefined()
|
|
57
|
+
* })
|
|
58
|
+
* },
|
|
59
|
+
* })
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare function pluginIntegrationTestRunner({ pluginPath, pluginOptions, additionalModules, injectedDependencies, schema, dbName, debug, cwd, hooks, testSuite, }: PluginTestRunnerConfig & {
|
|
63
|
+
testSuite: (options: PluginSuiteOptions) => void;
|
|
64
|
+
}): void;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=plugin-test-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-test-runner.d.ts","sourceRoot":"","sources":["../src/plugin-test-runner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAc3D,OAAO,EAAsC,YAAY,EAAE,MAAM,YAAY,CAAA;AAI7E,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,YAAY,CAAA;IAC7B,SAAS,EAAE,gBAAgB,CAAA;IAC3B,UAAU,EAAE,GAAG,CAAA;IACf,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAA;QACd,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED,UAAU,sBAAsB;IAC9B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEvC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAEvC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAE1C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE;QACN,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;QACtC,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KACrD,CAAA;CACF;AAiSD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,UAAU,EACV,aAAkB,EAClB,iBAAsB,EACtB,oBAAyB,EACzB,MAAiB,EACjB,MAAM,EACN,KAAa,EACb,GAAG,EACH,KAAK,EACL,SAAS,GACV,EAAE,sBAAsB,GAAG;IAC1B,SAAS,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAA;CACjD,QAwDA"}
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.pluginIntegrationTestRunner = pluginIntegrationTestRunner;
|
|
40
|
+
const logger_1 = require("@acmekit/framework/logger");
|
|
41
|
+
const subscribers_1 = require("@acmekit/framework/subscribers");
|
|
42
|
+
const workflows_1 = require("@acmekit/framework/workflows");
|
|
43
|
+
const jobs_1 = require("@acmekit/framework/jobs");
|
|
44
|
+
const utils_1 = require("@acmekit/framework/utils");
|
|
45
|
+
const fs = __importStar(require("fs"));
|
|
46
|
+
const path_1 = require("path");
|
|
47
|
+
const database_1 = require("./database");
|
|
48
|
+
const init_modules_1 = require("./init-modules");
|
|
49
|
+
const mock_event_bus_service_1 = __importDefault(require("./mock-event-bus-service"));
|
|
50
|
+
class PluginTestRunner {
|
|
51
|
+
constructor(config) {
|
|
52
|
+
this.connection = null;
|
|
53
|
+
this.moduleModels = [];
|
|
54
|
+
this.shutdown = async () => void 0;
|
|
55
|
+
this.acmekitApp = {};
|
|
56
|
+
this.globalContainer = null;
|
|
57
|
+
const tempName = parseInt(process.env.JEST_WORKER_ID || "1");
|
|
58
|
+
const pluginId = config.pluginPath.replace(/[^a-z0-9]/gi, "-");
|
|
59
|
+
this.pluginPath = config.pluginPath;
|
|
60
|
+
this.pluginOptions = config.pluginOptions ?? {};
|
|
61
|
+
this.additionalModules = config.additionalModules ?? {};
|
|
62
|
+
this.injectedDependencies = config.injectedDependencies ?? {};
|
|
63
|
+
this.dbName =
|
|
64
|
+
config.dbName ?? `acmekit-plugin-${pluginId}-integration-${tempName}`;
|
|
65
|
+
this.schema = config.schema ?? "public";
|
|
66
|
+
this.debug = config.debug ?? false;
|
|
67
|
+
this.cwd = config.cwd ?? process.cwd();
|
|
68
|
+
this.hooks = config.hooks ?? {};
|
|
69
|
+
this.dbConfig = {
|
|
70
|
+
clientUrl: (0, database_1.getDatabaseURL)(this.dbName),
|
|
71
|
+
schema: this.schema,
|
|
72
|
+
debug: this.debug,
|
|
73
|
+
};
|
|
74
|
+
this.setupProcessHandlers();
|
|
75
|
+
}
|
|
76
|
+
setupProcessHandlers() {
|
|
77
|
+
process.on("SIGTERM", async () => {
|
|
78
|
+
await this.cleanup();
|
|
79
|
+
process.exit(0);
|
|
80
|
+
});
|
|
81
|
+
process.on("SIGINT", async () => {
|
|
82
|
+
await this.cleanup();
|
|
83
|
+
process.exit(0);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
createContainerProxy() {
|
|
87
|
+
return new Proxy({}, {
|
|
88
|
+
get: (target, prop) => {
|
|
89
|
+
return this.globalContainer?.[prop];
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
createAcmeKitAppProxy() {
|
|
94
|
+
return new Proxy({}, {
|
|
95
|
+
get: (target, prop) => {
|
|
96
|
+
return this.acmekitApp?.[prop];
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
async beforeAll() {
|
|
101
|
+
try {
|
|
102
|
+
this.setupProcessHandlers();
|
|
103
|
+
process.env.LOG_LEVEL = "error";
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
await this.cleanup();
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
async beforeEach() {
|
|
111
|
+
try {
|
|
112
|
+
if (this.hooks?.beforePluginInit) {
|
|
113
|
+
await this.hooks.beforePluginInit();
|
|
114
|
+
}
|
|
115
|
+
// Resolve the plugin to discover its modules
|
|
116
|
+
const { defineConfig } = require("@acmekit/framework/utils");
|
|
117
|
+
const configModule = defineConfig({
|
|
118
|
+
plugins: [
|
|
119
|
+
{
|
|
120
|
+
resolve: this.pluginPath,
|
|
121
|
+
options: this.pluginOptions,
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
});
|
|
125
|
+
const plugins = await (0, utils_1.getResolvedPlugins)(this.cwd, configModule);
|
|
126
|
+
// Collect all plugin module configs
|
|
127
|
+
const pluginModulesConfig = {};
|
|
128
|
+
const moduleSdkImports = require("@acmekit/framework/modules-sdk");
|
|
129
|
+
for (const plugin of plugins) {
|
|
130
|
+
if (plugin.modules) {
|
|
131
|
+
for (const mod of plugin.modules) {
|
|
132
|
+
const moduleName = mod.key || mod.resolve;
|
|
133
|
+
pluginModulesConfig[moduleName] = {
|
|
134
|
+
definition: moduleSdkImports.ModulesDefinition[moduleName],
|
|
135
|
+
resolve: mod.resolve,
|
|
136
|
+
options: {
|
|
137
|
+
database: this.dbConfig,
|
|
138
|
+
...this.pluginOptions,
|
|
139
|
+
[utils_1.isSharedConnectionSymbol]: true,
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Merge with additional modules
|
|
146
|
+
const allModulesConfig = {
|
|
147
|
+
...pluginModulesConfig,
|
|
148
|
+
...this.additionalModules,
|
|
149
|
+
};
|
|
150
|
+
// Create connection
|
|
151
|
+
this.connection = utils_1.ModulesSdkUtils.createPgConnection(this.dbConfig);
|
|
152
|
+
// Auto-discover models from plugin modules
|
|
153
|
+
for (const plugin of plugins) {
|
|
154
|
+
if (plugin.modules) {
|
|
155
|
+
for (const mod of plugin.modules) {
|
|
156
|
+
const basePath = (0, utils_1.normalizeImportPathWithSource)(mod.resolve ?? this.cwd);
|
|
157
|
+
const modelsPath = fs.existsSync(`${basePath}/dist/models`)
|
|
158
|
+
? "/dist/models"
|
|
159
|
+
: fs.existsSync(`${basePath}/models`)
|
|
160
|
+
? "/models"
|
|
161
|
+
: "";
|
|
162
|
+
if (modelsPath) {
|
|
163
|
+
const models = (0, utils_1.loadModels)(`${basePath}${modelsPath}`);
|
|
164
|
+
this.moduleModels.push(...models);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
this.moduleModels = (0, utils_1.toMikroOrmEntities)(this.moduleModels);
|
|
170
|
+
if (this.moduleModels.length) {
|
|
171
|
+
this.MikroOrmWrapper = (0, database_1.getMikroOrmWrapper)({
|
|
172
|
+
mikroOrmEntities: this.moduleModels,
|
|
173
|
+
clientUrl: this.dbConfig.clientUrl,
|
|
174
|
+
schema: this.dbConfig.schema,
|
|
175
|
+
});
|
|
176
|
+
await this.MikroOrmWrapper.setupDatabase();
|
|
177
|
+
}
|
|
178
|
+
// Initialize modules
|
|
179
|
+
const moduleOptionsConfig = {
|
|
180
|
+
injectedDependencies: {
|
|
181
|
+
[utils_1.ContainerRegistrationKeys.PG_CONNECTION]: this.connection,
|
|
182
|
+
[utils_1.Modules.EVENT_BUS]: new mock_event_bus_service_1.default(),
|
|
183
|
+
[utils_1.ContainerRegistrationKeys.LOGGER]: console,
|
|
184
|
+
[utils_1.ContainerRegistrationKeys.CONFIG_MODULE]: {
|
|
185
|
+
modules: allModulesConfig,
|
|
186
|
+
},
|
|
187
|
+
...this.injectedDependencies,
|
|
188
|
+
},
|
|
189
|
+
modulesConfig: allModulesConfig,
|
|
190
|
+
databaseConfig: this.dbConfig,
|
|
191
|
+
joinerConfig: [],
|
|
192
|
+
preventConnectionDestroyWarning: true,
|
|
193
|
+
cwd: this.cwd,
|
|
194
|
+
};
|
|
195
|
+
const output = await (0, init_modules_1.initModules)(moduleOptionsConfig);
|
|
196
|
+
this.shutdown = output.shutdown;
|
|
197
|
+
this.acmekitApp = output.acmekitApp;
|
|
198
|
+
this.globalContainer = output.acmekitApp.sharedContainer;
|
|
199
|
+
// Load plugin subscribers, workflows, and jobs
|
|
200
|
+
for (const plugin of plugins) {
|
|
201
|
+
const subscriberDir = (0, path_1.join)(plugin.resolve, "subscribers");
|
|
202
|
+
if (this.globalContainer &&
|
|
203
|
+
fs.existsSync(subscriberDir)) {
|
|
204
|
+
const subscriberLoader = new subscribers_1.SubscriberLoader([subscriberDir], plugin.options ?? {}, this.globalContainer);
|
|
205
|
+
await subscriberLoader.load();
|
|
206
|
+
}
|
|
207
|
+
const workflowDir = (0, path_1.join)(plugin.resolve, "workflows");
|
|
208
|
+
if (this.globalContainer && fs.existsSync(workflowDir)) {
|
|
209
|
+
const workflowLoader = new workflows_1.WorkflowLoader([workflowDir], this.globalContainer);
|
|
210
|
+
await workflowLoader.load();
|
|
211
|
+
}
|
|
212
|
+
const jobDir = (0, path_1.join)(plugin.resolve, "jobs");
|
|
213
|
+
if (this.globalContainer && fs.existsSync(jobDir)) {
|
|
214
|
+
const jobLoader = new jobs_1.JobLoader([jobDir], plugin.options ?? {}, this.globalContainer);
|
|
215
|
+
await jobLoader.load();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (this.hooks?.afterPluginInit) {
|
|
219
|
+
await this.hooks.afterPluginInit(this.acmekitApp);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
logger_1.logger.error("Error in beforeEach:", error?.message);
|
|
224
|
+
await this.cleanup();
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
async afterEach() {
|
|
229
|
+
try {
|
|
230
|
+
if (this.moduleModels.length && this.MikroOrmWrapper) {
|
|
231
|
+
await this.MikroOrmWrapper.clearDatabase();
|
|
232
|
+
}
|
|
233
|
+
await this.shutdown();
|
|
234
|
+
this.acmekitApp = {};
|
|
235
|
+
this.globalContainer = null;
|
|
236
|
+
this.moduleModels = [];
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
logger_1.logger.error("Error in afterEach:", error?.message);
|
|
240
|
+
throw error;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
async cleanup() {
|
|
244
|
+
try {
|
|
245
|
+
process.removeAllListeners("SIGTERM");
|
|
246
|
+
process.removeAllListeners("SIGINT");
|
|
247
|
+
await this.connection?.context?.destroy();
|
|
248
|
+
await this.connection?.destroy();
|
|
249
|
+
this.acmekitApp = null;
|
|
250
|
+
this.globalContainer = null;
|
|
251
|
+
this.connection = null;
|
|
252
|
+
if (global.gc) {
|
|
253
|
+
global.gc();
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
logger_1.logger.error("Error during cleanup:", error?.message);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
getOptions() {
|
|
261
|
+
return {
|
|
262
|
+
MikroOrmWrapper: this.MikroOrmWrapper,
|
|
263
|
+
container: this.createContainerProxy(),
|
|
264
|
+
acmekitApp: this.createAcmeKitAppProxy(),
|
|
265
|
+
dbConfig: {
|
|
266
|
+
schema: this.schema,
|
|
267
|
+
clientUrl: this.dbConfig.clientUrl,
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Test runner for plugins. Heavier than moduleIntegrationTestRunner
|
|
274
|
+
* (loads all plugin resources: modules, subscribers, workflows, jobs)
|
|
275
|
+
* but lighter than acmekitIntegrationTestRunner (no Express, no admin,
|
|
276
|
+
* no core flows).
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* ```ts
|
|
280
|
+
* pluginIntegrationTestRunner({
|
|
281
|
+
* pluginPath: "./path/to/my-plugin",
|
|
282
|
+
* pluginOptions: { apiKey: "test-key" },
|
|
283
|
+
* testSuite: ({ container, acmekitApp }) => {
|
|
284
|
+
* it("should load plugin modules", () => {
|
|
285
|
+
* const service = container.resolve("myModuleService")
|
|
286
|
+
* expect(service).toBeDefined()
|
|
287
|
+
* })
|
|
288
|
+
* },
|
|
289
|
+
* })
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
function pluginIntegrationTestRunner({ pluginPath, pluginOptions = {}, additionalModules = {}, injectedDependencies = {}, schema = "public", dbName, debug = false, cwd, hooks, testSuite, }) {
|
|
293
|
+
const runner = new PluginTestRunner({
|
|
294
|
+
pluginPath,
|
|
295
|
+
pluginOptions,
|
|
296
|
+
additionalModules,
|
|
297
|
+
injectedDependencies,
|
|
298
|
+
schema,
|
|
299
|
+
dbName,
|
|
300
|
+
debug,
|
|
301
|
+
cwd,
|
|
302
|
+
hooks,
|
|
303
|
+
});
|
|
304
|
+
return describe("", () => {
|
|
305
|
+
let testOptions;
|
|
306
|
+
beforeAll(async () => {
|
|
307
|
+
await runner.beforeAll();
|
|
308
|
+
testOptions = runner.getOptions();
|
|
309
|
+
});
|
|
310
|
+
beforeEach(async () => {
|
|
311
|
+
await runner.beforeEach();
|
|
312
|
+
});
|
|
313
|
+
afterEach(async () => {
|
|
314
|
+
await runner.afterEach();
|
|
315
|
+
});
|
|
316
|
+
afterAll(async () => {
|
|
317
|
+
await runner.cleanup();
|
|
318
|
+
for (const key in testOptions) {
|
|
319
|
+
if (typeof testOptions[key] === "function") {
|
|
320
|
+
testOptions[key] = null;
|
|
321
|
+
}
|
|
322
|
+
else if (typeof testOptions[key] === "object" &&
|
|
323
|
+
testOptions[key] !== null) {
|
|
324
|
+
Object.keys(testOptions[key]).forEach((k) => {
|
|
325
|
+
testOptions[key][k] = null;
|
|
326
|
+
});
|
|
327
|
+
testOptions[key] = null;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
// @ts-ignore
|
|
331
|
+
testOptions = null;
|
|
332
|
+
if (global.gc) {
|
|
333
|
+
global.gc();
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
testSuite(runner.getOptions());
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
//# sourceMappingURL=plugin-test-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-test-runner.js","sourceRoot":"","sources":["../src/plugin-test-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsXA,kEAqEC;AA3bD,sDAAkD;AAClD,gEAAiE;AACjE,4DAA6D;AAC7D,kDAAmD;AAEnD,oDAUiC;AACjC,uCAAwB;AACxB,+BAA2B;AAC3B,yCAA6E;AAC7E,iDAAgE;AAChE,sFAAyE;AA+CzE,MAAM,gBAAgB;IAwBpB,YAAY,MAA8B;QAPlC,eAAU,GAAQ,IAAI,CAAA;QAEtB,iBAAY,GAAuC,EAAE,CAAA;QACrD,aAAQ,GAAwB,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,CAAA;QAClD,eAAU,GAAQ,EAAE,CAAA;QACpB,oBAAe,GAA4B,IAAI,CAAA;QAGrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,CAAA;QAC5D,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAA;QAC9D,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAA;QACnC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,IAAI,EAAE,CAAA;QAC/C,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,IAAI,EAAE,CAAA;QACvD,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,IAAI,EAAE,CAAA;QAC7D,IAA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AAA;QAEF,SAAS,CAAC,KAAK,IAAI,EAAE;YACnB,MAAM,MAAM,CAAC,SAAS,EAAE,CAAA;QAC1B,CAAC,CAAC,CAAA;QAEF,QAAQ,CAAC,KAAK,IAAI,EAAE;YAClB,MAAM,MAAM,CAAC,OAAO,EAAE,CAAA;YAEtB,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;gBAC9B,IAAI,OAAO,WAAW,CAAC,GAAG,CAAC,KAAK,UAAU,EAAE,CAAC;oBAC3C,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;gBACzB,CAAC;qBAAM,IACL,OAAO,WAAW,CAAC,GAAG,CAAC,KAAK,QAAQ;oBACpC,WAAW,CAAC,GAAG,CAAC,KAAK,IAAI,EACzB,CAAC;oBACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;wBAC1C,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;oBAC5B,CAAC,CAAC,CAAA;oBACF,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;gBACzB,CAAC;YACH,CAAC;YAED,aAAa;YACb,WAAW,GAAG,IAAI,CAAA;YAElB,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;gBACd,MAAM,CAAC,EAAE,EAAE,CAAA;YACb,CAAC;QACH,CAAC,CAAC,CAAA;QAEF,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/acmekit-test-runner.ts","../src/database.ts","../src/events.ts","../src/index.ts","../src/init-modules.ts","../src/jest.ts","../src/mock-event-bus-service.ts","../src/module-test-runner.ts","../src/__fixtures__/test-module/index.ts","../src/__fixtures__/test-module/service.ts","../src/__fixtures__/test-module/services/internal.ts","../src/__tests__/events.spec.ts","../src/__tests__/module-test-runner.spec.ts","../src/acmekit-test-runner-utils/bootstrap-app.ts","../src/acmekit-test-runner-utils/clear-instances.ts","../src/acmekit-test-runner-utils/config.ts","../src/acmekit-test-runner-utils/index.ts","../src/acmekit-test-runner-utils/use-db.ts","../src/acmekit-test-runner-utils/utils.ts","../src/acmekit-test-runner-utils/wait-workflow-executions.ts"],"version":"5.9.3"}
|
|
1
|
+
{"root":["../src/acmekit-test-runner.ts","../src/database.ts","../src/events.ts","../src/index.ts","../src/init-modules.ts","../src/jest.ts","../src/mock-event-bus-service.ts","../src/module-test-runner.ts","../src/plugin-test-runner.ts","../src/__fixtures__/test-module/index.ts","../src/__fixtures__/test-module/service.ts","../src/__fixtures__/test-module/services/internal.ts","../src/__tests__/events.spec.ts","../src/__tests__/module-test-runner.spec.ts","../src/acmekit-test-runner-utils/bootstrap-app.ts","../src/acmekit-test-runner-utils/clear-instances.ts","../src/acmekit-test-runner-utils/config.ts","../src/acmekit-test-runner-utils/index.ts","../src/acmekit-test-runner-utils/use-db.ts","../src/acmekit-test-runner-utils/utils.ts","../src/acmekit-test-runner-utils/wait-workflow-executions.ts"],"version":"5.9.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acmekit/test-utils",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.39",
|
|
4
4
|
"description": "Test utils for AcmeKit",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"author": "AcmeKit",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@acmekit/core-flows": "2.13.
|
|
29
|
-
"@acmekit/framework": "2.13.
|
|
28
|
+
"@acmekit/core-flows": "2.13.39",
|
|
29
|
+
"@acmekit/framework": "2.13.39"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@types/express": "^4.17.21",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"ulid": "^2.3.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@acmekit/acmekit": "2.13.
|
|
40
|
-
"@acmekit/core-flows": "2.13.
|
|
41
|
-
"@acmekit/framework": "2.13.
|
|
39
|
+
"@acmekit/acmekit": "2.13.39",
|
|
40
|
+
"@acmekit/core-flows": "2.13.39",
|
|
41
|
+
"@acmekit/framework": "2.13.39"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"@acmekit/acmekit": {
|