mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-18 00:23:25 -06:00
f594a8f7c6
* perf(ci): drop compact bin cap to 190s to split straggler pairings Fresh census from green run 29633628994: every fan-out job queues 65s, the pack sits at ~160s, but compact-large-3 ran 195s because the 235s cap let core-runtime-media-ui (hint 124) and core-unit-src-security (hint 95) share one bin. A 190s cap forbids such pairings; the plan goes from 21 to 25 compact bins and the hinted max drops accordingly, so the run wall tracks the pack instead of one straggler. Costs ~4 extra runners per run; wall is the optimization target. * perf(test): run DOM-free Control UI tests in the node environment 35 ui/src test files whose transitive import closure never touches DOM APIs or the lit runtime carried the ui config's jsdom default anyway; on CI the per-file jsdom construction dominates the shard (environment 95.2s vs tests 59.4s in run 29633628994). Annotate them with the repo-standard @vitest-environment node docblock (29 files in ui/ already use it). Verified: full ui config run passes with the annotations; the only failing files are three storage tests that fail identically on a clean checkout under local Node 26 and are untouched here. * chore: kick dropped push event for PR head ingest
27 lines
986 B
TypeScript
27 lines
986 B
TypeScript
// @vitest-environment node
|
|
// Control UI tests cover text direction behavior.
|
|
import { describe, expect, it } from "vitest";
|
|
import { detectTextDirection } from "./text-direction.ts";
|
|
|
|
describe("detectTextDirection", () => {
|
|
it("returns ltr for null and empty input", () => {
|
|
expect(detectTextDirection(null)).toBe("ltr");
|
|
expect(detectTextDirection("")).toBe("ltr");
|
|
});
|
|
|
|
it("detects rtl when first significant char is rtl script", () => {
|
|
expect(detectTextDirection("שלום עולם")).toBe("rtl");
|
|
expect(detectTextDirection("مرحبا")).toBe("rtl");
|
|
});
|
|
|
|
it("detects ltr when first significant char is ltr", () => {
|
|
expect(detectTextDirection("Hello world")).toBe("ltr");
|
|
});
|
|
|
|
it("skips punctuation and markdown prefix characters before detection", () => {
|
|
expect(detectTextDirection("**שלום")).toBe("rtl");
|
|
expect(detectTextDirection("# مرحبا")).toBe("rtl");
|
|
expect(detectTextDirection("- hello")).toBe("ltr");
|
|
});
|
|
});
|