fix(google): send translations as form data

This commit is contained in:
xixu-me committed 2026-08-19 17:00:22 +08:00
1 parent dab276fe17
commit dceed2e720
2 files changed
+11 -7

No files matched your search

+2 -1
View File
@@ -43,7 +43,8 @@ describe("Google Translate Service", () => {
expect(fetch).toHaveBeenCalledWith(
expect.stringContaining("translate.googleapis.com"),
expect.objectContaining({
method: "GET",
method: "POST",
body: expect.stringContaining("q=Hello"),
headers: expect.objectContaining({
"User-Agent": expect.stringContaining("Mozilla"),
}),