mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 17:51:22 +00:00
test: satisfy openai postJsonRequest mock shape
This commit is contained in:
@@ -80,6 +80,7 @@ describe("openai plugin", () => {
|
||||
mode: "api-key",
|
||||
});
|
||||
const postJsonRequestSpy = vi.spyOn(providerHttp, "postJsonRequest").mockResolvedValue({
|
||||
finalUrl: "https://api.openai.com/v1/images/generations",
|
||||
response: {
|
||||
ok: true,
|
||||
json: async () => ({
|
||||
@@ -147,6 +148,7 @@ describe("openai plugin", () => {
|
||||
mode: "api-key",
|
||||
});
|
||||
const postJsonRequestSpy = vi.spyOn(providerHttp, "postJsonRequest").mockResolvedValue({
|
||||
finalUrl: "https://api.openai.com/v1/images/edits",
|
||||
response: {
|
||||
ok: true,
|
||||
json: async () => ({
|
||||
|
||||
Reference in New Issue
Block a user