mvp-ai's picture
download
raw
2.09 kB
// Copyright (c) 2026 the Zuke contributors
// SPDX-License-Identifier: MIT
import { assertEquals, assertRejects } from "../../core/tests/_assert.ts";
import { ToolNotFoundError } from "@zuke/core/tooling";
import {
assertWrapperConformance,
missingTool,
} from "@zuke/core/tooling/conformance";
import {
ReleasePleaseGithubReleaseSettings,
ReleasePleaseReleasePrSettings,
ReleasePleaseTasks,
} from "../src/release_please.ts";
Deno.test("the default binary is release-please", () => {
assertEquals(
new ReleasePleaseReleasePrSettings().argv()[0],
"release-please",
);
});
Deno.test("release-pr: bare subcommand and all options", () => {
assertEquals(
new ReleasePleaseReleasePrSettings().argv().slice(1),
["release-pr"],
);
assertEquals(
new ReleasePleaseReleasePrSettings()
.token("xyz")
.repoUrl("owner/repo")
.targetBranch("main")
.configFile(".release-please-config.json")
.manifestFile(".release-please-manifest.json")
.dryRun()
.debug()
.argv()
.slice(1),
[
"release-pr",
"--token",
"xyz",
"--repo-url",
"owner/repo",
"--target-branch",
"main",
"--config-file",
".release-please-config.json",
"--manifest-file",
".release-please-manifest.json",
"--dry-run",
"--debug",
],
);
});
Deno.test("github-release: subcommand token", () => {
assertEquals(
new ReleasePleaseGithubReleaseSettings().token("t").argv().slice(1),
["github-release", "--token", "t"],
);
});
Deno.test("every ReleasePleaseTasks function reaches execution", async () => {
await assertRejects(
() => ReleasePleaseTasks.releasePr(missingTool),
ToolNotFoundError,
);
await assertRejects(
() => ReleasePleaseTasks.githubRelease(missingTool),
ToolNotFoundError,
);
});
Deno.test("release-please: conforms to the wrapper contract", async () => {
await assertWrapperConformance(
() => new ReleasePleaseReleasePrSettings(),
"release-please",
{
resolution: "path",
},
);
});

Xet Storage Details

Size:
2.09 kB
·
Xet hash:
72c7478d7434db3f269613c5c64ce0a80ac73263094016a5af491c27c6e44763

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.