mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:00:43 +00:00
test(extensions): move channel contracts out of core
This commit is contained in:
@@ -27,6 +27,10 @@ const FORBIDDEN_PATTERNS: Array<{ pattern: RegExp; hint: string }> = [
|
||||
pattern: /["'](?:\.\.\/)+(?:src\/plugins\/types\.js)["']/,
|
||||
hint: "Use public plugin-sdk/core types or test/helpers/plugins/* instead.",
|
||||
},
|
||||
{
|
||||
pattern: /["'](?:\.\.\/)+(?:src\/channels\/plugins\/contracts\/test-helpers\.js)["']/,
|
||||
hint: "Use openclaw/plugin-sdk/testing for channel contract test helpers.",
|
||||
},
|
||||
];
|
||||
|
||||
function isExtensionTestFile(filePath: string): boolean {
|
||||
|
||||
@@ -19,7 +19,6 @@ export function createChannelContractTestShards() {
|
||||
"checks-fast-contracts-channels-registry-b": [],
|
||||
"checks-fast-contracts-channels-core-a": [],
|
||||
"checks-fast-contracts-channels-core-b": [],
|
||||
"checks-fast-contracts-channels-extensions": [],
|
||||
};
|
||||
const pushBalanced = (firstKey, secondKey, file) => {
|
||||
const target = groups[firstKey].length <= groups[secondKey].length ? firstKey : secondKey;
|
||||
@@ -28,9 +27,7 @@ export function createChannelContractTestShards() {
|
||||
|
||||
for (const file of listContractTestFiles(rootDir)) {
|
||||
const name = relative(rootDir, file).replaceAll("\\", "/");
|
||||
if (name.startsWith("plugins-core-extension.")) {
|
||||
groups["checks-fast-contracts-channels-extensions"].push(file);
|
||||
} else if (name.startsWith("plugins-core.") || name.startsWith("plugin.")) {
|
||||
if (name.startsWith("plugins-core.") || name.startsWith("plugin.")) {
|
||||
pushBalanced(
|
||||
"checks-fast-contracts-channels-core-a",
|
||||
"checks-fast-contracts-channels-core-b",
|
||||
|
||||
Reference in New Issue
Block a user