mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-08 11:02:26 +00:00
test(scripts): route docs i18n module changes
This commit is contained in:
15
test/scripts/docs-i18n.test.ts
Normal file
15
test/scripts/docs-i18n.test.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// Docs i18n tests cover the Go module backing docs translation.
|
||||
import { spawnSync } from "node:child_process";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("docs-i18n Go module", () => {
|
||||
it("passes Go tests", () => {
|
||||
const result = spawnSync("go", ["test", "./...", "-count=1"], {
|
||||
cwd: "scripts/docs-i18n",
|
||||
encoding: "utf8",
|
||||
});
|
||||
|
||||
expect(result.error).toBeUndefined();
|
||||
expect(result.status, result.stderr || result.stdout).toBe(0);
|
||||
});
|
||||
});
|
||||
@@ -1084,6 +1084,19 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps docs i18n Go module edits on Go module tests", () => {
|
||||
for (const modulePath of [
|
||||
"scripts/docs-i18n/main.go",
|
||||
"scripts/docs-i18n/main_test.go",
|
||||
"scripts/docs-i18n/go.mod",
|
||||
]) {
|
||||
expect(resolveChangedTestTargetPlan([modulePath]), modulePath).toEqual({
|
||||
mode: "targets",
|
||||
targets: ["test/scripts/docs-i18n.test.ts"],
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps k8s manifest edits on manifest tests", () => {
|
||||
expect(resolveChangedTestTargetPlan(["scripts/k8s/manifests/configmap.yaml"])).toEqual({
|
||||
mode: "targets",
|
||||
|
||||
Reference in New Issue
Block a user