it("keeps the root ui lane aligned with the isolated jsdom setup", () => { const config = createUiVitestConfig();
expect(config.test.environment).toBe("jsdom");
expect(config.test.isolate).toBe(true);
expect(config.test.runner).toBeUndefined(); const setupFiles = normalizeConfigPaths(config.test.setupFiles);
expect(setupFiles).not.toContain("test/setup-openclaw-runtime.ts");
expect(setupFiles).toContain("ui/src/test-helpers/lit-warnings.setup.ts");
expect(config.test.deps?.optimizer?.web?.enabled).toBe(true);
});
it("keeps the unit-ui shard aligned with the isolated jsdom setup", () => {
expect(unitUiConfig.test?.environment).toBe("jsdom");
expect(unitUiConfig.test?.isolate).toBe(true);
expect(unitUiConfig.test?.runner).toBeUndefined(); const setupFiles = normalizeConfigPaths(unitUiConfig.test?.setupFiles);
expect(setupFiles).not.toContain("test/setup-openclaw-runtime.ts");
expect(setupFiles).toContain("ui/src/test-helpers/lit-warnings.setup.ts");
});
it("keeps the unit lane on the non-isolated runner by default", () => { const config = createUnitVitestConfig();
expect(config.test.isolate).toBe(false);
expect(normalizeConfigPath(config.test.runner)).toBe("test/non-isolated-runner.ts");
});
it("keeps the unit-fast lane on shared workers without the reset-heavy runner", () => { const config = createUnitFastVitestConfig();
expect(config.test.isolate).toBe(false);
expect(config.test.runner).toBeUndefined();
});
it("keeps the bundled lane on thread workers with the non-isolated runner", () => {
expect(bundledConfig.test?.pool).toBe("threads");
expect(bundledConfig.test?.isolate).toBe(false);
expect(normalizeConfigPath(bundledConfig.test?.runner)).toBe("test/non-isolated-runner.ts");
});
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.