mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-19 16:25:50 +00:00
test: satisfy openai postJsonRequest mock shape
This commit is contained in:
parent
67f1a20136
commit
43b91c0ab3
1 changed files with 2 additions and 0 deletions
|
|
@ -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 () => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue