test(auth): assert parseOAuthPersistBlob({}) returns null
Document the contract the remote read() path leans on — the server's
missing-file response is `c.json({}, 200)`, and the backend now passes
that empty object straight to parseOAuthPersistBlob. Addresses the
optional note on Claude review of #1612.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
54d5b18b1e
commit
cdeb2316d0
1 changed files with 7 additions and 0 deletions
|
|
@ -9,6 +9,13 @@ describe("parseOAuthPersistBlob", () => {
|
||||||
expect(parseOAuthPersistBlob(null)).toBeNull();
|
expect(parseOAuthPersistBlob(null)).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("returns null for an empty object (server missing-file response)", () => {
|
||||||
|
// The remote read() path relies on this: the server answers a missing
|
||||||
|
// store with `c.json({}, 200)`, and the backend passes that straight
|
||||||
|
// through instead of special-casing an empty object.
|
||||||
|
expect(parseOAuthPersistBlob({})).toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
it("reads plain JSON with servers and idpSessions", () => {
|
it("reads plain JSON with servers and idpSessions", () => {
|
||||||
const snapshot = {
|
const snapshot = {
|
||||||
servers: {
|
servers: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue