tests: add coverage for src/actions/ (15 files) and src/lib/{admin,auth} (3 files)

- src/actions coverage: 2.4% -> 13.55%
- src/lib/admin coverage: 44.3% -> 84.81%
- src/lib/auth coverage: 90.52%
- vitest.config.ts: exclude .next.prev/ from test discovery
This commit is contained in:
openhands committed 2026-07-30 18:48:51 +02:00
1 parent c433e5a52f
commit ea7d861e69
19 files changed
+1262 -1

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import { describe, expect, it } from "vitest";
import {
personalTokenScope,
USER_TOKENABLE_TYPE,
} from "./personal-token-scope";
describe("personal-token-scope", () => {
it("exports USER_TOKENABLE_TYPE constant", () => {
expect(USER_TOKENABLE_TYPE).toBe("App\\Models\\User");
});
it("returns correct scope with BigInt", () => {
const r = personalTokenScope(42);
expect(r.tokenableId).toBe(BigInt(42));
expect(r.tokenableType).toBe("App\\Models\\User");
});
});