mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: use public plugin sdk test fixtures
This commit is contained in:
@@ -1,12 +0,0 @@
|
|||||||
export {
|
|
||||||
BUNDLED_PLUGIN_E2E_TEST_GLOB,
|
|
||||||
BUNDLED_PLUGIN_LIVE_TEST_GLOB,
|
|
||||||
BUNDLED_PLUGIN_PATH_PREFIX,
|
|
||||||
BUNDLED_PLUGIN_ROOT_DIR,
|
|
||||||
BUNDLED_PLUGIN_TEST_GLOB,
|
|
||||||
bundledDistPluginFile,
|
|
||||||
bundledDistPluginRoot,
|
|
||||||
bundledPluginCallsite,
|
|
||||||
bundledPluginFile,
|
|
||||||
bundledPluginRoot,
|
|
||||||
} from "../../scripts/lib/bundled-plugin-paths.mjs";
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { importFreshModule } from "../../src/plugin-sdk/test-helpers/import-fresh.js";
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import { normalizeTranscriptForMatch } from "openclaw/plugin-sdk/provider-test-contracts";
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import { normalizeTranscriptForMatch } from "./stt-live-audio.js";
|
|
||||||
|
|
||||||
describe("normalizeTranscriptForMatch", () => {
|
describe("normalizeTranscriptForMatch", () => {
|
||||||
it("normalizes punctuation and common OpenClaw live transcription variants", () => {
|
it("normalizes punctuation and common OpenClaw live transcription variants", () => {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
export { normalizeTranscriptForMatch } from "../../src/plugin-sdk/test-helpers/stt-live-audio.js";
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
import { bundledPluginRoot } from "openclaw/plugin-sdk/test-fixtures";
|
||||||
import { afterEach, describe, expect, it } from "vitest";
|
import { afterEach, describe, expect, it } from "vitest";
|
||||||
import {
|
import {
|
||||||
buildOfficialChannelCatalog,
|
buildOfficialChannelCatalog,
|
||||||
@@ -7,7 +8,6 @@ import {
|
|||||||
writeOfficialChannelCatalog,
|
writeOfficialChannelCatalog,
|
||||||
} from "../scripts/write-official-channel-catalog.mjs";
|
} from "../scripts/write-official-channel-catalog.mjs";
|
||||||
import { describePluginInstallSource } from "../src/plugins/install-source-info.js";
|
import { describePluginInstallSource } from "../src/plugins/install-source-info.js";
|
||||||
import { bundledPluginRoot } from "./helpers/bundled-plugin-paths.js";
|
|
||||||
import { cleanupTempDirs, makeTempRepoRoot, writeJsonFile } from "./helpers/temp-repo.js";
|
import { cleanupTempDirs, makeTempRepoRoot, writeJsonFile } from "./helpers/temp-repo.js";
|
||||||
|
|
||||||
const tempDirs: string[] = [];
|
const tempDirs: string[] = [];
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { mkdirSync } from "node:fs";
|
import { mkdirSync } from "node:fs";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
|
import { bundledPluginFile, bundledPluginRoot } from "openclaw/plugin-sdk/test-fixtures";
|
||||||
import { afterEach, describe, expect, it } from "vitest";
|
import { afterEach, describe, expect, it } from "vitest";
|
||||||
import {
|
import {
|
||||||
collectPublishablePluginPackages,
|
collectPublishablePluginPackages,
|
||||||
@@ -12,7 +13,6 @@ import {
|
|||||||
resolveSelectedPublishablePluginPackages,
|
resolveSelectedPublishablePluginPackages,
|
||||||
type PublishablePluginPackage,
|
type PublishablePluginPackage,
|
||||||
} from "../scripts/lib/plugin-npm-release.ts";
|
} from "../scripts/lib/plugin-npm-release.ts";
|
||||||
import { bundledPluginFile, bundledPluginRoot } from "./helpers/bundled-plugin-paths.js";
|
|
||||||
import { cleanupTempDirs, makeTempRepoRoot, writeJsonFile } from "./helpers/temp-repo.js";
|
import { cleanupTempDirs, makeTempRepoRoot, writeJsonFile } from "./helpers/temp-repo.js";
|
||||||
|
|
||||||
const tempDirs: string[] = [];
|
const tempDirs: string[] = [];
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { mkdtempSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
import { mkdtempSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
||||||
import { tmpdir } from "node:os";
|
import { tmpdir } from "node:os";
|
||||||
import { dirname, join } from "node:path";
|
import { dirname, join } from "node:path";
|
||||||
|
import { bundledDistPluginFile, bundledPluginFile } from "openclaw/plugin-sdk/test-fixtures";
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import { listBundledPluginPackArtifacts } from "../scripts/lib/bundled-plugin-build-entries.mjs";
|
import { listBundledPluginPackArtifacts } from "../scripts/lib/bundled-plugin-build-entries.mjs";
|
||||||
import { listPluginSdkDistArtifacts } from "../scripts/lib/plugin-sdk-entries.mjs";
|
import { listPluginSdkDistArtifacts } from "../scripts/lib/plugin-sdk-entries.mjs";
|
||||||
@@ -24,7 +25,6 @@ import {
|
|||||||
resolveMissingPackBuildHint,
|
resolveMissingPackBuildHint,
|
||||||
} from "../scripts/release-check.ts";
|
} from "../scripts/release-check.ts";
|
||||||
import { PACKAGE_DIST_INVENTORY_RELATIVE_PATH } from "../src/infra/package-dist-inventory.ts";
|
import { PACKAGE_DIST_INVENTORY_RELATIVE_PATH } from "../src/infra/package-dist-inventory.ts";
|
||||||
import { bundledDistPluginFile, bundledPluginFile } from "./helpers/bundled-plugin-paths.js";
|
|
||||||
|
|
||||||
function makeItem(shortVersion: string, sparkleVersion: string): string {
|
function makeItem(shortVersion: string, sparkleVersion: string): string {
|
||||||
return `<item><title>${shortVersion}</title><sparkle:shortVersionString>${shortVersion}</sparkle:shortVersionString><sparkle:version>${sparkleVersion}</sparkle:version></item>`;
|
return `<item><title>${shortVersion}</title><sparkle:shortVersionString>${shortVersion}</sparkle:shortVersionString><sparkle:version>${sparkleVersion}</sparkle:version></item>`;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { execFileSync } from "node:child_process";
|
import { execFileSync } from "node:child_process";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
import { bundledPluginFile, bundledPluginRoot } from "openclaw/plugin-sdk/test-fixtures";
|
||||||
import { describe, expect, it, vi } from "vitest";
|
import { describe, expect, it, vi } from "vitest";
|
||||||
import {
|
import {
|
||||||
detectChangedExtensionIds,
|
detectChangedExtensionIds,
|
||||||
@@ -16,7 +17,6 @@ import {
|
|||||||
resolveExtensionBatchParallelism,
|
resolveExtensionBatchParallelism,
|
||||||
runExtensionBatchPlan,
|
runExtensionBatchPlan,
|
||||||
} from "../../scripts/test-extension-batch.mjs";
|
} from "../../scripts/test-extension-batch.mjs";
|
||||||
import { bundledPluginFile, bundledPluginRoot } from "../helpers/bundled-plugin-paths.js";
|
|
||||||
|
|
||||||
const scriptPath = path.join(process.cwd(), "scripts", "test-extension.mjs");
|
const scriptPath = path.join(process.cwd(), "scripts", "test-extension.mjs");
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
import { importFreshModule } from "openclaw/plugin-sdk/test-fixtures";
|
||||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||||
import { importFreshModule } from "./helpers/import-fresh.ts";
|
|
||||||
import { cleanupTempDirs, makeTempDir } from "./helpers/temp-dir.js";
|
import { cleanupTempDirs, makeTempDir } from "./helpers/temp-dir.js";
|
||||||
import { installTestEnv } from "./test-env.js";
|
import { installTestEnv } from "./test-env.js";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import { bundledPluginFile } from "openclaw/plugin-sdk/test-fixtures";
|
||||||
import { afterEach, describe, expect, it } from "vitest";
|
import { afterEach, describe, expect, it } from "vitest";
|
||||||
import { bundledPluginFile } from "./helpers/bundled-plugin-paths.js";
|
|
||||||
import { createPatternFileHelper } from "./helpers/pattern-file.js";
|
import { createPatternFileHelper } from "./helpers/pattern-file.js";
|
||||||
import { loadIncludePatternsFromEnv } from "./vitest/vitest.extensions.config.ts";
|
import { loadIncludePatternsFromEnv } from "./vitest/vitest.extensions.config.ts";
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
import { BUNDLED_PLUGIN_TEST_GLOB, bundledPluginFile } from "openclaw/plugin-sdk/test-fixtures";
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import { BUNDLED_PLUGIN_TEST_GLOB, bundledPluginFile } from "./helpers/bundled-plugin-paths.js";
|
|
||||||
import { cleanupTempDirs, makeTempDir } from "./helpers/temp-dir.js";
|
import { cleanupTempDirs, makeTempDir } from "./helpers/temp-dir.js";
|
||||||
import { normalizeConfigPath, normalizeConfigPaths } from "./helpers/vitest-config-paths.js";
|
import { normalizeConfigPath, normalizeConfigPaths } from "./helpers/vitest-config-paths.js";
|
||||||
import { createAcpVitestConfig } from "./vitest/vitest.acp.config.ts";
|
import { createAcpVitestConfig } from "./vitest/vitest.acp.config.ts";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import { bundledPluginFile } from "openclaw/plugin-sdk/test-fixtures";
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import { bundledPluginFile } from "./helpers/bundled-plugin-paths.js";
|
|
||||||
import { isUnitConfigTestFile } from "./vitest/vitest.unit-paths.mjs";
|
import { isUnitConfigTestFile } from "./vitest/vitest.unit-paths.mjs";
|
||||||
|
|
||||||
describe("isUnitConfigTestFile", () => {
|
describe("isUnitConfigTestFile", () => {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { BUNDLED_PLUGIN_PATH_PREFIX } from "openclaw/plugin-sdk/test-fixtures";
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import {
|
import {
|
||||||
collectWebFetchProviderBoundaryViolations,
|
collectWebFetchProviderBoundaryViolations,
|
||||||
@@ -7,7 +8,6 @@ import {
|
|||||||
collectWebSearchProviderBoundaryInventory,
|
collectWebSearchProviderBoundaryInventory,
|
||||||
main as webSearchMain,
|
main as webSearchMain,
|
||||||
} from "../scripts/check-web-search-provider-boundaries.mjs";
|
} from "../scripts/check-web-search-provider-boundaries.mjs";
|
||||||
import { BUNDLED_PLUGIN_PATH_PREFIX } from "./helpers/bundled-plugin-paths.js";
|
|
||||||
import { createCapturedIo } from "./helpers/captured-io.js";
|
import { createCapturedIo } from "./helpers/captured-io.js";
|
||||||
|
|
||||||
const webFetchViolationsPromise = collectWebFetchProviderBoundaryViolations();
|
const webFetchViolationsPromise = collectWebFetchProviderBoundaryViolations();
|
||||||
|
|||||||
Reference in New Issue
Block a user