mirror of https://github.com/openclaw/openclaw.git
perf: route browser and line extension tests
This commit is contained in:
parent
1e90b3afcd
commit
34cd49faa6
|
|
@ -249,6 +249,28 @@ describe("test-projects args", () => {
|
|||
]);
|
||||
});
|
||||
|
||||
it("routes browser extension targets to the extension channel config", () => {
|
||||
expect(buildVitestRunPlans(["extensions/browser/index.test.ts"])).toEqual([
|
||||
{
|
||||
config: "vitest.extension-channels.config.ts",
|
||||
forwardedArgs: [],
|
||||
includePatterns: ["extensions/browser/index.test.ts"],
|
||||
watchMode: false,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("routes line extension targets to the extension channel config", () => {
|
||||
expect(buildVitestRunPlans(["extensions/line/src/send.test.ts"])).toEqual([
|
||||
{
|
||||
config: "vitest.extension-channels.config.ts",
|
||||
forwardedArgs: [],
|
||||
includePatterns: ["extensions/line/src/send.test.ts"],
|
||||
watchMode: false,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("routes direct provider extension file targets to the extensions config", () => {
|
||||
expect(buildVitestRunPlans(["extensions/firecrawl/index.test.ts"])).toEqual([
|
||||
{
|
||||
|
|
|
|||
|
|
@ -83,10 +83,7 @@ describe("scoped vitest configs", () => {
|
|||
});
|
||||
|
||||
it("keeps the core channel lane limited to non-extension roots", () => {
|
||||
expect(defaultChannelsConfig.test?.include).toEqual([
|
||||
"src/browser/**/*.test.ts",
|
||||
"src/line/**/*.test.ts",
|
||||
]);
|
||||
expect(defaultChannelsConfig.test?.include).toEqual([]);
|
||||
});
|
||||
|
||||
it("loads channel include overrides from OPENCLAW_VITEST_INCLUDE_FILE", () => {
|
||||
|
|
@ -123,13 +120,17 @@ describe("scoped vitest configs", () => {
|
|||
|
||||
it("normalizes extension channel include patterns relative to the scoped dir", () => {
|
||||
expect(defaultExtensionChannelsConfig.test?.dir).toBe("extensions");
|
||||
expect(defaultExtensionChannelsConfig.test?.include).toEqual([
|
||||
"discord/**/*.test.ts",
|
||||
"whatsapp/**/*.test.ts",
|
||||
"slack/**/*.test.ts",
|
||||
"signal/**/*.test.ts",
|
||||
"imessage/**/*.test.ts",
|
||||
]);
|
||||
expect(defaultExtensionChannelsConfig.test?.include).toEqual(
|
||||
expect.arrayContaining([
|
||||
"browser/**/*.test.ts",
|
||||
"discord/**/*.test.ts",
|
||||
"line/**/*.test.ts",
|
||||
"whatsapp/**/*.test.ts",
|
||||
"slack/**/*.test.ts",
|
||||
"signal/**/*.test.ts",
|
||||
"imessage/**/*.test.ts",
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
it("normalizes extension include patterns relative to the scoped dir", () => {
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ export const channelTestRoots = [
|
|||
bundledPluginRoot("slack"),
|
||||
bundledPluginRoot("signal"),
|
||||
bundledPluginRoot("imessage"),
|
||||
"src/browser",
|
||||
"src/line",
|
||||
bundledPluginRoot("browser"),
|
||||
bundledPluginRoot("line"),
|
||||
];
|
||||
|
||||
export const extensionChannelTestRoots = channelTestRoots.filter((root) =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue