mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-21 13:44:03 +00:00
test: route gateway HTTP history and startup wiring to e2e
This commit is contained in:
@@ -281,7 +281,11 @@ function classifyTarget(arg, cwd) {
|
||||
if (relative.endsWith(".e2e.test.ts")) {
|
||||
return "e2e";
|
||||
}
|
||||
if (relative === "src/gateway/gateway.test.ts") {
|
||||
if (
|
||||
relative === "src/gateway/gateway.test.ts" ||
|
||||
relative === "src/gateway/server.startup-matrix-migration.integration.test.ts" ||
|
||||
relative === "src/gateway/sessions-history-http.test.ts"
|
||||
) {
|
||||
return "e2e";
|
||||
}
|
||||
if (relative.startsWith("extensions/")) {
|
||||
|
||||
@@ -175,13 +175,17 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("routes the gateway e2e fixture to the e2e lane", () => {
|
||||
const plans = buildVitestRunPlans(["src/gateway/gateway.test.ts"], process.cwd());
|
||||
it.each([
|
||||
"src/gateway/gateway.test.ts",
|
||||
"src/gateway/server.startup-matrix-migration.integration.test.ts",
|
||||
"src/gateway/sessions-history-http.test.ts",
|
||||
])("routes gateway integration fixture %s to the e2e lane", (target) => {
|
||||
const plans = buildVitestRunPlans([target], process.cwd());
|
||||
|
||||
expect(plans).toEqual([
|
||||
{
|
||||
config: "vitest.e2e.config.ts",
|
||||
forwardedArgs: ["src/gateway/gateway.test.ts"],
|
||||
forwardedArgs: [target],
|
||||
includePatterns: null,
|
||||
watchMode: false,
|
||||
},
|
||||
|
||||
@@ -549,6 +549,10 @@ describe("scoped vitest configs", () => {
|
||||
expect(defaultGatewayConfig.test?.dir).toBe("src/gateway");
|
||||
expect(defaultGatewayConfig.test?.include).toEqual(["**/*.test.ts"]);
|
||||
expect(defaultGatewayConfig.test?.exclude).toContain("gateway.test.ts");
|
||||
expect(defaultGatewayConfig.test?.exclude).toContain(
|
||||
"server.startup-matrix-migration.integration.test.ts",
|
||||
);
|
||||
expect(defaultGatewayConfig.test?.exclude).toContain("sessions-history-http.test.ts");
|
||||
});
|
||||
|
||||
it("normalizes infra include patterns relative to the scoped dir", () => {
|
||||
|
||||
@@ -36,6 +36,8 @@ export default defineConfig({
|
||||
"test/**/*.e2e.test.ts",
|
||||
"src/**/*.e2e.test.ts",
|
||||
"src/gateway/gateway.test.ts",
|
||||
"src/gateway/server.startup-matrix-migration.integration.test.ts",
|
||||
"src/gateway/sessions-history-http.test.ts",
|
||||
BUNDLED_PLUGIN_E2E_TEST_GLOB,
|
||||
],
|
||||
exclude,
|
||||
|
||||
@@ -4,7 +4,11 @@ export function createGatewayVitestConfig(env?: Record<string, string | undefine
|
||||
return createScopedVitestConfig(["src/gateway/**/*.test.ts"], {
|
||||
dir: "src/gateway",
|
||||
env,
|
||||
exclude: ["src/gateway/gateway.test.ts"],
|
||||
exclude: [
|
||||
"src/gateway/gateway.test.ts",
|
||||
"src/gateway/server.startup-matrix-migration.integration.test.ts",
|
||||
"src/gateway/sessions-history-http.test.ts",
|
||||
],
|
||||
name: "gateway",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user