Migrate RowAPI.fetch

This commit is contained in:
Sam Rose 2024-03-01 17:04:35 +00:00
parent a98948150d
commit 376bb9c105
No known key found for this signature in database
1 changed files with 4 additions and 7 deletions

View File

@ -95,14 +95,11 @@ export class RowAPI extends TestAPI {
fetch = async (
sourceId: string,
{ expectStatus } = { expectStatus: 200 }
expectations?: Expectations
): Promise<Row[]> => {
const request = this.request
.get(`/api/${sourceId}/rows`)
.set(this.config.defaultHeaders())
.expect(expectStatus)
return (await request).body
return await this._get<Row[]>(`/api/${sourceId}/rows`, {
expectations,
})
}
exportRows = async (