Skip to content

Commit 405c126

Browse files
committed
move buffer.from to match variable name
1 parent f3cf8a1 commit 405c126

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/core/src/testE2E/amazonqGumby/transformByQ.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ describe('transformByQ', async function () {
5252
})
5353

5454
it('WHEN upload payload with missing sha256 in headers THEN fails to upload', async function () {
55-
const buffer = await fs.readFile(zippedCodePath)
56-
const sha256 = getSha256(Buffer.from(buffer))
55+
const buffer = Buffer.from(await fs.readFile(zippedCodePath))
56+
const sha256 = getSha256(buffer)
5757
const response = await codeWhisperer.codeWhispererClient.createUploadUrl({
5858
contentChecksum: sha256,
5959
contentChecksumType: CodeWhispererConstants.contentChecksumType,
@@ -88,8 +88,8 @@ describe('transformByQ', async function () {
8888
})
8989

9090
it('WHEN createUploadUrl THEN URL uses HTTPS and sets 60 second expiration', async function () {
91-
const buffer = await fs.readFile(zippedCodePath)
92-
const sha256 = getSha256(Buffer.from(buffer))
91+
const buffer = Buffer.from(await fs.readFile(zippedCodePath))
92+
const sha256 = getSha256(buffer)
9393
const response = await codeWhisperer.codeWhispererClient.createUploadUrl({
9494
contentChecksum: sha256,
9595
contentChecksumType: CodeWhispererConstants.contentChecksumType,

0 commit comments

Comments
 (0)