mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:40:44 +00:00
fix(ci): repair main test gates
This commit is contained in:
@@ -448,6 +448,7 @@ function expectPluginSourcePrecedence(
|
||||
expectedDisabledOrigin: string;
|
||||
label: string;
|
||||
expectedDisabledError?: string;
|
||||
expectDuplicateWarning?: boolean;
|
||||
},
|
||||
) {
|
||||
const entries = registry.plugins.filter((entry) => entry.id === scenario.pluginId);
|
||||
@@ -458,15 +459,13 @@ function expectPluginSourcePrecedence(
|
||||
const expectedWarning =
|
||||
scenario.expectedDisabledError ??
|
||||
`${scenario.expectedDisabledOrigin} plugin will be overridden by ${scenario.expectedLoadedOrigin} plugin`;
|
||||
expect(
|
||||
registry.diagnostics.some(
|
||||
(diag) =>
|
||||
diag.level === "warn" &&
|
||||
diag.pluginId === scenario.pluginId &&
|
||||
diag.message.includes(expectedWarning),
|
||||
),
|
||||
scenario.label,
|
||||
).toBe(true);
|
||||
const hasDuplicateWarning = registry.diagnostics.some(
|
||||
(diag) =>
|
||||
diag.level === "warn" &&
|
||||
diag.pluginId === scenario.pluginId &&
|
||||
diag.message.includes(expectedWarning),
|
||||
);
|
||||
expect(hasDuplicateWarning, scenario.label).toBe(scenario.expectDuplicateWarning ?? true);
|
||||
}
|
||||
|
||||
function expectPluginOriginAndStatus(params: {
|
||||
@@ -6757,6 +6756,7 @@ module.exports = {
|
||||
expectedLoadedOrigin: "global",
|
||||
expectedDisabledOrigin: "bundled",
|
||||
expectedDisabledError: "overridden by global plugin",
|
||||
expectDuplicateWarning: false,
|
||||
assert: expectPluginSourcePrecedence,
|
||||
},
|
||||
] as const;
|
||||
|
||||
Reference in New Issue
Block a user