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 ( fetch = async (
sourceId: string, sourceId: string,
{ expectStatus } = { expectStatus: 200 } expectations?: Expectations
): Promise<Row[]> => { ): Promise<Row[]> => {
const request = this.request return await this._get<Row[]>(`/api/${sourceId}/rows`, {
.get(`/api/${sourceId}/rows`) expectations,
.set(this.config.defaultHeaders()) })
.expect(expectStatus)
return (await request).body
} }
exportRows = async ( exportRows = async (