Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
485d8af
test: add coverage for renderer helpers and theme buildIndexCSS
unhappychoice May 3, 2026
5cf9864
test: cover fetchPRsByRefs retry and error paths
unhappychoice May 3, 2026
3b6b936
test: cover withSpinner TTY and non-TTY paths
unhappychoice May 3, 2026
d9975ac
test: cover fetch commit-msg subcommand and missing-token error path
unhappychoice May 3, 2026
373de06
test: cover setRepoSecret retry and failure paths
unhappychoice May 3, 2026
6c49ccd
test: cover fetchEvents 429 retry-after and exhaustion paths
unhappychoice May 3, 2026
9e73269
test: cover fetchReleases retry-after fallbacks and failure paths
unhappychoice May 3, 2026
dc6160e
test: cover weekly-fetch github-data assembly and daily-fetch missing…
unhappychoice May 3, 2026
ba66bb0
test: cover fetchCommitMessages retry-after fallbacks and failure paths
unhappychoice May 3, 2026
bd75f29
test: cover searchWeeklyPRs dedup, 401 auth error, and 500 warn paths
unhappychoice May 3, 2026
416b05b
test: cover render unknown-theme exit and missing data-dir paths
unhappychoice May 3, 2026
2eadc01
test: cover setup invalid-model decline and llm-secret failure paths
unhappychoice May 3, 2026
0483874
test: cover setup prompt validators and preprocess empty-field omissions
unhappychoice May 3, 2026
dbd55ca
test: cover release draft filter, name fallback, and card idle defaults
unhappychoice May 3, 2026
23b9400
test: cover ticker YAML parsing and OpenAI-compat empty-content fallb…
unhappychoice May 3, 2026
02ad24d
test: cover index-page entry fallbacks, i18n unknown-language paths, …
unhappychoice May 3, 2026
afb9322
test: cover DST-skipped midnight and RSS month-overflow pubDate paths
unhappychoice May 3, 2026
6d83b5e
test: cover weekly-fetch error paths and CLI entrypoint wiring
unhappychoice May 3, 2026
de99ba5
test: cover content defaults, parse-error hint, and og-image unknown-…
unhappychoice May 3, 2026
a6b5cbf
test: cover generate unknown-provider key message and non-Error logging
unhappychoice May 3, 2026
3529829
test: cover daily-fetch non-Error logging and commit-msg env fallbacks
unhappychoice May 3, 2026
7d9e745
test: cover render dir defaults, non-Error logging, and GITHUB_REPOSI…
unhappychoice May 3, 2026
4bc9858
test: cover Pacific/Norfolk DST-end midnight remainMs subtraction branch
unhappychoice May 3, 2026
bba0a1f
test: cover deploy directory default and non-Error logging
unhappychoice May 3, 2026
765387d
test: cover aggregateRepositories open-issue issuesClosed branch
unhappychoice May 3, 2026
8cdd49c
test: cover render middle-week nextWeek and prevPrev navigation links
unhappychoice May 3, 2026
1da1edb
test: cover render prev re-render skip and llm-data filter branches
unhappychoice May 3, 2026
e2b406d
test: cover validate-model non-Error connection rejection branch
unhappychoice May 3, 2026
b639383
test: cover addFileToRepo 403 PAT permission hint branch
unhappychoice May 3, 2026
74379af
test: cover weekly-fetch repo aggregation and commit-message mapping …
unhappychoice May 3, 2026
6db4f43
test: cover setup default actions URL fallback when runs API fails
unhappychoice May 3, 2026
beaefee
test: cover render missing base URL exit branch
unhappychoice May 3, 2026
363584b
test: cover setup non-Error rejection String fallback branch
unhappychoice May 3, 2026
d300243
test: cover fetchPRsByRefs error body without message field branch
unhappychoice May 3, 2026
7022889
test: cover fetch-commits link header without rel=next branch
unhappychoice May 3, 2026
6081e44
test: cover setRepoSecret PUT response text rejection fallback branch
unhappychoice May 3, 2026
b6a9a96
test: cover fetch-commits falsy repo entry skip branch
unhappychoice May 3, 2026
0861ba3
test: cover fetch-releases falsy repo entry skip branch
unhappychoice May 3, 2026
a4d70a6
test: cover setup undefined LLM provider not-configured branch
unhappychoice May 3, 2026
31f8f3f
test: cover parseLocalDate America/Havana DST-skipped midnight brute-…
unhappychoice May 3, 2026
1dc3c68
test: cover renderIndexPage theme missing init/toggle scripts fallbac…
unhappychoice May 3, 2026
ab2ee0e
test: cover renderReport theme missing init/toggle scripts fallback b…
unhappychoice May 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions src/cli/commands/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,47 @@ describe("registerDeploy", () => {
expect.objectContaining({ directory: "./env-output" }),
);
});

it("falls back to ./output when neither --directory nor OUTPUT_DIR is set", async () => {
vi.stubEnv("GITHUB_TOKEN", "ghp_test");
vi.stubEnv("GITHUB_REPOSITORY", "owner/repo");
const savedOutputDir = process.env.OUTPUT_DIR;
delete process.env.OUTPUT_DIR;

try {
const { Command } = await import("commander");
const { registerDeploy } = await import("./deploy.js");
const program = new Command();
registerDeploy(program);

await program.parseAsync(["node", "cli", "deploy"]);

expect(mockDeploy).toHaveBeenCalledWith(
expect.objectContaining({ directory: "./output" }),
);
} finally {
if (savedOutputDir !== undefined) process.env.OUTPUT_DIR = savedOutputDir;
}
});

it("logs raw value when deploy rejects with a non-Error", async () => {
vi.stubEnv("GITHUB_TOKEN", "ghp_test");
mockDeploy.mockRejectedValueOnce("string-failure");
const errorSpy = vi.spyOn(console, "error").mockImplementation(() => {});

const { Command } = await import("commander");
const { registerDeploy } = await import("./deploy.js");
const program = new Command();
registerDeploy(program);

await expect(
program.parseAsync([
"node", "cli", "deploy",
"--directory", "./output",
"--repo", "owner/repo",
]),
).rejects.toThrow("process.exit");

expect(errorSpy).toHaveBeenCalledWith("Error:", "string-failure");
});
});
Loading