Repository navigation
test(ci): repair cross-platform fixtures and stabilize lint runtime #8429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,10 +106,16 @@ describe("ZCode client config", () => { | |
| }); | ||
|
|
||
| test("resolves the data-dir override and the documented v2 destination", () => { | ||
| expect(zcodeHomeDir({}, "/home/u")).toBe(join("/home/u", ".zcode")); | ||
| expect(zcodeConfigPath({}, "/home/u")).toBe(join("/home/u", ".zcode", "v2", "config.json")); | ||
| expect(zcodeConfigPath({ ZCODE_DATA_DIR: join(tmpdir(), "elsewhere") }, "/home/u")).toBe(join(join(tmpdir(), "elsewhere"), "v2", "config.json")); | ||
| expect(() => zcodeConfigPath({ ZCODE_DATA_DIR: "relative" }, "/home/u")).toThrow(ClientPathError); | ||
| const reads: string[] = []; | ||
| const missingBootstrap = { readText: (path: string) => { | ||
| reads.push(path); | ||
| return { kind: "missing" as const }; | ||
| } }; | ||
|
Comment on lines
+110
to
+113
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| expect(zcodeHomeDir({}, "/home/u", missingBootstrap)).toBe(join("/home/u", ".zcode")); | ||
| expect(zcodeConfigPath({}, "/home/u", missingBootstrap)).toBe(join("/home/u", ".zcode", "v2", "config.json")); | ||
| expect(zcodeConfigPath({ ZCODE_DATA_DIR: join(tmpdir(), "elsewhere") }, "/home/u", missingBootstrap)).toBe(join(join(tmpdir(), "elsewhere"), "v2", "config.json")); | ||
| expect(() => zcodeConfigPath({ ZCODE_DATA_DIR: "relative" }, "/home/u", missingBootstrap)).toThrow(ClientPathError); | ||
| expect(reads).toEqual(Array(2).fill(join("/home/u", ".zcode", "v2", "setting.json"))); | ||
| }); | ||
| }); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: lidge-jun/opencodex
Length of output: 11057
Script executed:
Repository: lidge-jun/opencodex
Length of output: 36443
Script executed:
Repository: lidge-jun/opencodex
Length of output: 12981
Script executed:
node -e 'const invalid = /[\x00-\x1f\x7f/\\]/; console.log(invalid.test("dir\\app.zip"), invalid.test("app.zip"), invalid.test("\0"));'Repository: lidge-jun/opencodex
Length of output: 173
Add a workflow-level filename regression test.
The checker at
tests/ci-workflows/release-pipeline-contract.test.ts:717tests heredoc transport, not the workflow validator. A workflow change that acceptsdir\app.zipwould leave this test passing. Add an attachment test that supplies that receipt name and asserts that the workflow rejects it.