mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
test(core): trim duplicate strict-subset assertions (#124090)
This commit is contained in:
committed by
GitHub
parent
d1f8c339b1
commit
34efe370b2
@@ -27,8 +27,6 @@ describe("scripts/bench-model", () => {
|
||||
});
|
||||
|
||||
it("rejects unknown args before checking provider credentials", () => {
|
||||
expect(() => testing.parseArgs(["--wat"])).toThrow("Unknown argument: --wat");
|
||||
|
||||
const result = runBenchModel(["--wat"]);
|
||||
|
||||
expect(result.status).toBe(1);
|
||||
|
||||
@@ -23,8 +23,6 @@ describe("scripts/perf/summarize-cpuprofile.mjs", () => {
|
||||
});
|
||||
|
||||
it("prints help without treating it as a profile path", () => {
|
||||
expect(shouldPrintHelp(["--help"])).toBe(true);
|
||||
expect(shouldPrintHelp(["--limit", "-h", "a.cpuprofile"])).toBe(false);
|
||||
expect(shouldPrintHelp(["--limit", "--", "--help"])).toBe(false);
|
||||
expect(shouldPrintHelp(["--limit=1e3", "--help"])).toBe(false);
|
||||
expect(shouldPrintHelp(["--", "--help"])).toBe(false);
|
||||
@@ -46,7 +44,6 @@ describe("scripts/perf/summarize-cpuprofile.mjs", () => {
|
||||
it("rejects malformed limit flags instead of falling back", () => {
|
||||
for (const args of [
|
||||
["--limit", "3frames", "a.cpuprofile"],
|
||||
["--limit", "-h", "a.cpuprofile"],
|
||||
["--limit", "--", "--help"],
|
||||
["--limit", "0", "a.cpuprofile"],
|
||||
["--limit=1e3", "a.cpuprofile"],
|
||||
@@ -70,8 +67,6 @@ describe("scripts/perf/summarize-cpuprofile.mjs", () => {
|
||||
});
|
||||
|
||||
it("rejects unknown options instead of treating them as profile paths", () => {
|
||||
expect(() => parseArgs(["--wat"])).toThrow("Unknown option: --wat");
|
||||
|
||||
const result = spawnSync(process.execPath, ["scripts/perf/summarize-cpuprofile.mjs", "--wat"], {
|
||||
cwd: process.cwd(),
|
||||
encoding: "utf8",
|
||||
|
||||
@@ -15,13 +15,7 @@ afterEach(async () => {
|
||||
});
|
||||
|
||||
describe("test-shell-completion script", () => {
|
||||
it("parses explicit shell overrides", () => {
|
||||
expect(shellCompletionTesting.parseArgs(["--shell", "bash", "--check-only"])).toEqual({
|
||||
checkOnly: true,
|
||||
force: false,
|
||||
help: false,
|
||||
shell: "bash",
|
||||
});
|
||||
it("parses an attached shell override", () => {
|
||||
expect(shellCompletionTesting.parseArgs(["--shell=fish"])).toEqual({
|
||||
checkOnly: false,
|
||||
force: false,
|
||||
@@ -30,8 +24,7 @@ describe("test-shell-completion script", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("rejects unknown or malformed arguments before touching shell state", () => {
|
||||
expect(() => shellCompletionTesting.parseArgs(["--wat"])).toThrow("Unknown argument: --wat");
|
||||
it("rejects malformed arguments before touching shell state", () => {
|
||||
expect(() => shellCompletionTesting.parseArgs(["--shell"])).toThrow("--shell requires a value");
|
||||
expect(() => shellCompletionTesting.parseArgs(["--shell", "--check-only"])).toThrow(
|
||||
"--shell requires a value",
|
||||
|
||||
Reference in New Issue
Block a user