From 19bb5b5293f339f26f218754314516033c479ef2 Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Mon, 27 Apr 2026 18:10:32 -0400 Subject: [PATCH] test(ext/sw): assert PUT method on GitHub writeFileCreateOnly create path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors the POST assertion already present in the Gitea "creates" test — catches accidental method drift. Co-Authored-By: Claude Opus 4.7 --- .../src/service-worker/__tests__/git-host-extensions.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/src/service-worker/__tests__/git-host-extensions.test.ts b/extension/src/service-worker/__tests__/git-host-extensions.test.ts index 259e949..0cd3eea 100644 --- a/extension/src/service-worker/__tests__/git-host-extensions.test.ts +++ b/extension/src/service-worker/__tests__/git-host-extensions.test.ts @@ -107,5 +107,6 @@ describe('writeFileCreateOnly (GitHub)', () => { const host = new GitHubHost('user/vault', 'tok'); await host.writeFileCreateOnly('manifest.enc', new Uint8Array([1]), 'init'); expect(fetchSpy).toHaveBeenCalledTimes(2); + expect((fetchSpy.mock.calls[1][1] as RequestInit).method).toBe('PUT'); }); });