Skip to content

Commit

Permalink
✅ fix dbtests after updating error handling in admin api
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesau committed Feb 14, 2025
1 parent 21e0287 commit d08901d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions adminSiteServer/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,10 @@ async function makeRequestAgainstAdminApi(
body,
})

expect(response.status).toBe(200)

const json = await response.json()

if (verifySuccess) {
expect(response.status).toBe(200)
expect(json.success).toBe(true)
}

Expand Down Expand Up @@ -914,7 +913,7 @@ describe("OwidAdminApp: indicator-level chart configs", () => {
},
{ verifySuccess: false }
)
expect(json.success).toBe(false)
expect(json.error.status).toBe(400)
})

it("should return an error if the schema is invalid", async () => {
Expand All @@ -930,7 +929,7 @@ describe("OwidAdminApp: indicator-level chart configs", () => {
},
{ verifySuccess: false }
)
expect(json.success).toBe(false)
expect(json.error.status).toBe(400)
})
})

Expand Down

0 comments on commit d08901d

Please sign in to comment.