mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:50:42 +00:00
refactor: expose channel contract test helpers
This commit is contained in:
@@ -11,7 +11,11 @@ const FORBIDDEN_PATTERNS: Array<{ pattern: RegExp; hint: string }> = [
|
||||
},
|
||||
{
|
||||
pattern: /["']openclaw\/plugin-sdk\/test-utils["']/,
|
||||
hint: "Use openclaw/plugin-sdk/testing or a focused plugin-sdk test subpath for the public extension test surface.",
|
||||
hint: "Use a focused plugin-sdk test subpath for the public extension test surface.",
|
||||
},
|
||||
{
|
||||
pattern: /["']openclaw\/plugin-sdk\/testing["']/,
|
||||
hint: "Use a focused plugin-sdk test subpath instead of the broad compatibility testing barrel.",
|
||||
},
|
||||
{
|
||||
pattern: /["']openclaw\/plugin-sdk\/compat["']/,
|
||||
@@ -25,6 +29,10 @@ const FORBIDDEN_PATTERNS: Array<{ pattern: RegExp; hint: string }> = [
|
||||
pattern: /["'](?:\.\.\/)+(?:test\/helpers\/plugins\/)[^"']+["']/,
|
||||
hint: "Use a documented openclaw/plugin-sdk test subpath instead of repo-only plugin helper bridges.",
|
||||
},
|
||||
{
|
||||
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: /["'](?:\.\.\/)+(?:src\/test-utils\/)[^"']+["']/,
|
||||
hint: "Use a documented openclaw/plugin-sdk test subpath for public surfaces.",
|
||||
@@ -45,7 +53,7 @@ const MOCK_RELATIVE_MODULE_PATTERN =
|
||||
/\bvi\.(?:mock|doMock|unmock|doUnmock)\s*\(\s*["']([^"']+)["']/g;
|
||||
|
||||
const RELATIVE_CORE_HINT =
|
||||
"Use openclaw/plugin-sdk/testing or a focused plugin-sdk test/runtime subpath instead of core internals.";
|
||||
"Use a focused plugin-sdk test/runtime subpath instead of core internals.";
|
||||
|
||||
// Tombstones for retired repo-only plugin helper bridge files. Keep this list so
|
||||
// deleted bridges fail loudly if they are recreated instead of using SDK subpaths.
|
||||
|
||||
Reference in New Issue
Block a user