Tests: add unit-fast Vitest lane

This commit is contained in:
Peter Steinberger
2026-04-07 10:01:26 +01:00
parent ae12aa49c3
commit ba484d263b
20 changed files with 550 additions and 137 deletions

View File

@@ -163,33 +163,44 @@ describe("test-projects args", () => {
});
it("routes daemon targets to the daemon config", () => {
expect(buildVitestRunPlans(["src/daemon/constants.test.ts"])).toEqual([
expect(buildVitestRunPlans(["src/daemon/inspect.test.ts"])).toEqual([
{
config: "vitest.daemon.config.ts",
forwardedArgs: [],
includePatterns: ["src/daemon/constants.test.ts"],
includePatterns: ["src/daemon/inspect.test.ts"],
watchMode: false,
},
]);
});
it("routes media targets to the media config", () => {
expect(buildVitestRunPlans(["src/media/mime.test.ts"])).toEqual([
expect(buildVitestRunPlans(["src/media/fetch.test.ts"])).toEqual([
{
config: "vitest.media.config.ts",
forwardedArgs: [],
includePatterns: ["src/media/mime.test.ts"],
includePatterns: ["src/media/fetch.test.ts"],
watchMode: false,
},
]);
});
it("routes plugin-sdk targets to the plugin-sdk config", () => {
expect(buildVitestRunPlans(["src/plugin-sdk/provider-stream.test.ts"])).toEqual([
expect(buildVitestRunPlans(["src/plugin-sdk/anthropic-vertex-auth-presence.test.ts"])).toEqual([
{
config: "vitest.plugin-sdk.config.ts",
forwardedArgs: [],
includePatterns: ["src/plugin-sdk/provider-stream.test.ts"],
includePatterns: ["src/plugin-sdk/anthropic-vertex-auth-presence.test.ts"],
watchMode: false,
},
]);
});
it("routes unit-fast light targets to the cache-friendly unit-fast config", () => {
expect(buildVitestRunPlans(["src/plugin-sdk/provider-entry.test.ts"])).toEqual([
{
config: "vitest.unit-fast.config.ts",
forwardedArgs: [],
includePatterns: ["src/plugin-sdk/provider-entry.test.ts"],
watchMode: false,
},
]);
@@ -217,10 +228,10 @@ describe("test-projects args", () => {
]);
});
it("routes shared-core targets to the shared-core config", () => {
it("routes unit-fast shared-core targets to the unit-fast config", () => {
expect(buildVitestRunPlans(["src/shared/text-chunking.test.ts"])).toEqual([
{
config: "vitest.shared-core.config.ts",
config: "vitest.unit-fast.config.ts",
forwardedArgs: [],
includePatterns: ["src/shared/text-chunking.test.ts"],
watchMode: false,
@@ -240,11 +251,11 @@ describe("test-projects args", () => {
});
it("routes logging targets to the logging config", () => {
expect(buildVitestRunPlans(["src/logging/load-levels.test.ts"])).toEqual([
expect(buildVitestRunPlans(["src/logging/console-settings.test.ts"])).toEqual([
{
config: "vitest.logging.config.ts",
forwardedArgs: [],
includePatterns: ["src/logging/load-levels.test.ts"],
includePatterns: ["src/logging/console-settings.test.ts"],
watchMode: false,
},
]);
@@ -339,11 +350,11 @@ describe("test-projects args", () => {
});
it("routes channel targets to the channels config", () => {
expect(buildVitestRunPlans(["src/channels/ids.test.ts"])).toEqual([
expect(buildVitestRunPlans(["src/channels/session.test.ts"])).toEqual([
{
config: "vitest.channels.config.ts",
forwardedArgs: [],
includePatterns: ["src/channels/ids.test.ts"],
includePatterns: ["src/channels/session.test.ts"],
watchMode: false,
},
]);