feat(config): add interactive config editor and GitLab PR support (#4)
Build / bun-build (push) Successful in 32s
Build / bun-build (push) Successful in 32s
Revamp the configuration UI with an interactive editor that supports inline text editing, navigation, and field validation, replacing the previous sequential prompts. Add GitLab pull request creation support via the `glab` CLI, and extend back navigation to all interactive menus for a consistent user experience. Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { test, expect, describe } from "bun:test";
|
||||
import { detectPlatformFromHostname } from "../src/pr";
|
||||
|
||||
describe("pr platform detection", () => {
|
||||
test("detects supported hosted platforms", () => {
|
||||
expect(detectPlatformFromHostname("github.com")).toBe("github");
|
||||
expect(detectPlatformFromHostname("gitlab.com")).toBe("gitlab");
|
||||
});
|
||||
|
||||
test("detects self-hosted platform hostnames", () => {
|
||||
expect(detectPlatformFromHostname("gitlab.example.com")).toBe("gitlab");
|
||||
expect(detectPlatformFromHostname("gitea.example.com")).toBe("gitea");
|
||||
});
|
||||
|
||||
test("returns null for unknown hostnames", () => {
|
||||
expect(detectPlatformFromHostname("git.example.com")).toBeNull();
|
||||
expect(detectPlatformFromHostname(null)).toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user