Skip to content

Commit c5d77f6

Browse files
added comments for response.url
1 parent fcf7ea3 commit c5d77f6

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

tests/component-tests/apiGateway-tests/get-letter-pdf.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,11 @@ test.describe("API Gateway Tests to Verify Get Letter PDF Endpoint", () => {
5151
};
5252
}
5353

54-
const pdfUrl = await response.url();
54+
const pdfUrl = await response.url(); //function returns response url though get letter data will automatically redirect to the url in the Location header.
5555
const parsed = new URL(pdfUrl);
5656
const expiresParam = parsed.searchParams.get("X-Amz-Expires");
57-
58-
expect(expiresParam).toBeTruthy();
5957
const expiresSeconds = Number(expiresParam);
60-
expect(Number.isFinite(expiresSeconds)).toBeTruthy();
58+
expect(expiresSeconds).toBe(60);
6159

6260
const waitMs = Math.max(expiresSeconds * 1000 + 2000, 0);
6361
await new Promise((resolve) => {

0 commit comments

Comments
 (0)