Skip to content

Commit

Permalink
batch improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
marikaner committed Oct 16, 2024
1 parent 8510dc7 commit 7e4899e
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ HTTP/1.1 200 OK
const response = await batch(
operations.testFunctionImportGet({} as any)
).execute({ url: baseUrl });
expect(response[0].isReadResponse()).toBeTruthy();
if (response[0].isReadResponse()) {
const casted = testFunctionImportGet({} as any).responseTransformer(
response[0].body
);
expect(casted).toEqual('MyText');
} else {
throw new Error('Should be readResponse');
}
});

Expand Down Expand Up @@ -137,11 +136,10 @@ HTTP/1.1 200 OK
const response = await batch(
testEntityApi.requestBuilder().getAll()
).execute({ url: baseUrl });
expect(response[0].isReadResponse()).toBeTruthy();
if (response[0].isReadResponse()) {
const casted = response[0].as(testEntityApi);
expect(casted[0].stringProperty).toEqual('4711');
} else {
throw new Error('Should be readResponse');
}
});
});

0 comments on commit 7e4899e

Please sign in to comment.