1
0
Fork 0
mirror of synced 2024-07-06 15:00:49 +12:00

Migrate RowAPI.validate

This commit is contained in:
Sam Rose 2024-03-01 16:39:57 +00:00
parent a639ba91d3
commit 58b1c2bca6
No known key found for this signature in database

View file

@ -46,15 +46,15 @@ export class RowAPI extends TestAPI {
validate = async (
sourceId: string,
row: SaveRowRequest,
{ expectStatus } = { expectStatus: 200 }
expectations?: Expectations
): Promise<ValidateResponse> => {
const resp = await this.request
.post(`/api/${sourceId}/rows/validate`)
.send(row)
.set(this.config.defaultHeaders())
.expect("Content-Type", /json/)
.expect(expectStatus)
return resp.body as ValidateResponse
return await this._post<ValidateResponse>(
`/api/${sourceId}/rows/validate`,
{
body: row,
expectations,
}
)
}
patch = async (