test: expose provider media test helpers

This commit is contained in:
Peter Steinberger
2026-04-28 02:47:18 +01:00
parent 7f3dead335
commit 1945389374
33 changed files with 191 additions and 83 deletions

View File

@@ -33,6 +33,10 @@ const FORBIDDEN_PATTERNS: Array<{ pattern: RegExp; hint: string }> = [
pattern: /["'](?:\.\.\/)+(?:test\/helpers\/channels\/)[^"']+["']/,
hint: "Use openclaw/plugin-sdk/channel-test-helpers or another focused SDK test subpath instead of repo-only channel helper bridges.",
},
{
pattern: /["'](?:\.\.\/)+(?:test\/helpers\/media-generation\/)[^"']+["']/,
hint: "Use openclaw/plugin-sdk/provider-test-contracts or openclaw/plugin-sdk/provider-http-test-mocks instead of repo-only media provider helper bridges.",
},
{
pattern: /["'](?:\.\.\/)+(?:src\/channels\/plugins\/contracts\/test-helpers\/)[^"']+["']/,
hint: "Use openclaw/plugin-sdk/channel-test-helpers or another focused SDK test subpath instead of core-only channel contract helpers.",
@@ -107,6 +111,9 @@ const RETIRED_EXTENSION_TEST_HELPER_BRIDGE_FILES = [
"test/helpers/plugins/typed-cases.ts",
"test/helpers/plugins/web-fetch-provider-contract.ts",
"test/helpers/plugins/web-search-provider-contract.ts",
"test/helpers/media-generation/dashscope-video-provider.ts",
"test/helpers/media-generation/provider-capability-assertions.ts",
"test/helpers/media-generation/provider-http-mocks.ts",
];
function isExtensionTestFile(filePath: string): boolean {

View File

@@ -119,6 +119,9 @@ export const pluginSdkDocMetadata = {
"provider-test-contracts": {
category: "utilities",
},
"provider-http-test-mocks": {
category: "utilities",
},
"test-env": {
category: "utilities",
},

View File

@@ -114,6 +114,7 @@
"plugin-test-api",
"plugin-test-contracts",
"plugin-test-runtime",
"provider-http-test-mocks",
"provider-test-contracts",
"test-env",
"test-fixtures",