Migrate RowAPI.fetch
This commit is contained in:
parent
a98948150d
commit
376bb9c105
|
@ -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 (
|
||||||
|
|
Loading…
Reference in New Issue