From b9a9dbfec28bcd4960c02ee56c30767b54cd151e Mon Sep 17 00:00:00 2001 From: Quentin Vernot Date: Tue, 26 Jul 2022 10:10:39 +0200 Subject: [PATCH] Revert "refacto(func-tests): extracted `expectProgressReport` last arg to a variable" This reverts commit 721aa6552ad0ce5ab4060ae422234d89eabe4d61. --- packages/functional-tests/src/encryption.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/functional-tests/src/encryption.ts b/packages/functional-tests/src/encryption.ts index ef4b5857..48149684 100644 --- a/packages/functional-tests/src/encryption.ts +++ b/packages/functional-tests/src/encryption.ts @@ -10,8 +10,6 @@ import { expectProgressReport, expectType, expectSameType, expectDeepEqual, expe const { READY } = statuses; -const streamStepSize = encryptionV4.defaultMaxEncryptedChunkSize - encryptionV4.overhead; - export const generateEncryptionTests = (args: TestArgs) => { const clearText: string = 'Rivest Shamir Adleman'; @@ -126,7 +124,7 @@ export const generateEncryptionTests = (args: TestArgs) => { onProgress.resetHistory(); const decrypted = await bobLaptop.decrypt(encrypted, { onProgress }); - expectProgressReport(onProgress, decrypted.length, streamStepSize); + expectProgressReport(onProgress, decrypted.length, encryptionV4.defaultMaxEncryptedChunkSize - encryptionV4.overhead); }); it('encrypt should ignore resource id argument', async () => { @@ -586,7 +584,7 @@ export const generateEncryptionTests = (args: TestArgs) => { const decrypted = await aliceLaptop.decryptData(encrypted, { onProgress }); expectSameType(decrypted, clear); expectDeepEqual(decrypted, clear); - expectProgressReport(onProgress, getDataLength(decrypted), streamStepSize); + expectProgressReport(onProgress, getDataLength(decrypted), encryptionV4.defaultMaxEncryptedChunkSize - encryptionV4.overhead); }); }); });