mirror of
https://github.com/prdlk/jobyssey.git
synced 2026-11-08 16:07:38 +00:00
feat: add skills
This commit is contained in:
1 parent
6984212b17
commit
c50aa92862
150 files changed
+12702
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { runCLI } from "./helpers";
|
||||
|
||||
function parseError(stderr: string): { error: string; code: string } {
|
||||
return JSON.parse(stderr);
|
||||
}
|
||||
|
||||
describe("Jobbank CLI error contract", () => {
|
||||
test("search without a filter fails with JSON on stderr", async () => {
|
||||
const result = await runCLI(["search"]);
|
||||
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.stdout).toBe("");
|
||||
expect(parseError(result.stderr)).toEqual({
|
||||
error: "--key or at least one filter is required",
|
||||
code: "MISSING_REQUIRED",
|
||||
});
|
||||
});
|
||||
|
||||
test("detail without an ID fails before making a request", async () => {
|
||||
const result = await runCLI(["detail"]);
|
||||
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.stdout).toBe("");
|
||||
expect(parseError(result.stderr)).toEqual({
|
||||
error: "Job ID is required",
|
||||
code: "MISSING_REQUIRED",
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user