test: use public plugin sdk test fixtures · openclaw/openclaw@a812b8f
steipete
·
2026-04-28
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { normalizeTranscriptForMatch } from "openclaw/plugin-sdk/provider-test-contracts"; |
1 | 2 | import { describe, expect, it } from "vitest"; |
2 | | -import { normalizeTranscriptForMatch } from "./stt-live-audio.js"; |
3 | 3 | |
4 | 4 | describe("normalizeTranscriptForMatch", () => { |
5 | 5 | it("normalizes punctuation and common OpenClaw live transcription variants", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import fs from "node:fs"; |
2 | 2 | import path from "node:path"; |
| 3 | +import { bundledPluginRoot } from "openclaw/plugin-sdk/test-fixtures"; |
3 | 4 | import { afterEach, describe, expect, it } from "vitest"; |
4 | 5 | import { |
5 | 6 | buildOfficialChannelCatalog, |
6 | 7 | OFFICIAL_CHANNEL_CATALOG_RELATIVE_PATH, |
7 | 8 | writeOfficialChannelCatalog, |
8 | 9 | } from "../scripts/write-official-channel-catalog.mjs"; |
9 | 10 | import { describePluginInstallSource } from "../src/plugins/install-source-info.js"; |
10 | | -import { bundledPluginRoot } from "./helpers/bundled-plugin-paths.js"; |
11 | 11 | import { cleanupTempDirs, makeTempRepoRoot, writeJsonFile } from "./helpers/temp-repo.js"; |
12 | 12 | |
13 | 13 | const tempDirs: string[] = []; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { mkdirSync } from "node:fs"; |
2 | 2 | import { join } from "node:path"; |
| 3 | +import { bundledPluginFile, bundledPluginRoot } from "openclaw/plugin-sdk/test-fixtures"; |
3 | 4 | import { afterEach, describe, expect, it } from "vitest"; |
4 | 5 | import { |
5 | 6 | collectPublishablePluginPackages, |
@@ -12,7 +13,6 @@ import {
|
12 | 13 | resolveSelectedPublishablePluginPackages, |
13 | 14 | type PublishablePluginPackage, |
14 | 15 | } from "../scripts/lib/plugin-npm-release.ts"; |
15 | | -import { bundledPluginFile, bundledPluginRoot } from "./helpers/bundled-plugin-paths.js"; |
16 | 16 | import { cleanupTempDirs, makeTempRepoRoot, writeJsonFile } from "./helpers/temp-repo.js"; |
17 | 17 | |
18 | 18 | const tempDirs: string[] = []; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { mkdtempSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs"; |
2 | 2 | import { tmpdir } from "node:os"; |
3 | 3 | import { dirname, join } from "node:path"; |
| 4 | +import { bundledDistPluginFile, bundledPluginFile } from "openclaw/plugin-sdk/test-fixtures"; |
4 | 5 | import { describe, expect, it } from "vitest"; |
5 | 6 | import { listBundledPluginPackArtifacts } from "../scripts/lib/bundled-plugin-build-entries.mjs"; |
6 | 7 | import { listPluginSdkDistArtifacts } from "../scripts/lib/plugin-sdk-entries.mjs"; |
@@ -24,7 +25,6 @@ import {
|
24 | 25 | resolveMissingPackBuildHint, |
25 | 26 | } from "../scripts/release-check.ts"; |
26 | 27 | import { PACKAGE_DIST_INVENTORY_RELATIVE_PATH } from "../src/infra/package-dist-inventory.ts"; |
27 | | -import { bundledDistPluginFile, bundledPluginFile } from "./helpers/bundled-plugin-paths.js"; |
28 | 28 | |
29 | 29 | function makeItem(shortVersion: string, sparkleVersion: string): string { |
30 | 30 | return `<item><title>${shortVersion}</title><sparkle:shortVersionString>${shortVersion}</sparkle:shortVersionString><sparkle:version>${sparkleVersion}</sparkle:version></item>`; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { execFileSync } from "node:child_process"; |
2 | 2 | import path from "node:path"; |
| 3 | +import { bundledPluginFile, bundledPluginRoot } from "openclaw/plugin-sdk/test-fixtures"; |
3 | 4 | import { describe, expect, it, vi } from "vitest"; |
4 | 5 | import { |
5 | 6 | detectChangedExtensionIds, |
@@ -16,7 +17,6 @@ import {
|
16 | 17 | resolveExtensionBatchParallelism, |
17 | 18 | runExtensionBatchPlan, |
18 | 19 | } from "../../scripts/test-extension-batch.mjs"; |
19 | | -import { bundledPluginFile, bundledPluginRoot } from "../helpers/bundled-plugin-paths.js"; |
20 | 20 | |
21 | 21 | const scriptPath = path.join(process.cwd(), "scripts", "test-extension.mjs"); |
22 | 22 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import fs from "node:fs"; |
2 | 2 | import path from "node:path"; |
| 3 | +import { importFreshModule } from "openclaw/plugin-sdk/test-fixtures"; |
3 | 4 | import { afterEach, describe, expect, it, vi } from "vitest"; |
4 | | -import { importFreshModule } from "./helpers/import-fresh.ts"; |
5 | 5 | import { cleanupTempDirs, makeTempDir } from "./helpers/temp-dir.js"; |
6 | 6 | import { installTestEnv } from "./test-env.js"; |
7 | 7 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { bundledPluginFile } from "openclaw/plugin-sdk/test-fixtures"; |
1 | 2 | import { afterEach, describe, expect, it } from "vitest"; |
2 | | -import { bundledPluginFile } from "./helpers/bundled-plugin-paths.js"; |
3 | 3 | import { createPatternFileHelper } from "./helpers/pattern-file.js"; |
4 | 4 | import { loadIncludePatternsFromEnv } from "./vitest/vitest.extensions.config.ts"; |
5 | 5 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。