Skip to content

Commit

Permalink
Revert "refacto(func-tests): extracted expectProgressReport last ar…
Browse files Browse the repository at this point in the history
…g to a variable"

This reverts commit 721aa65.
  • Loading branch information
quentinvernot committed Jul 26, 2022
1 parent fcc010b commit b9a9dbf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/functional-tests/src/encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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);
});
});
});
Expand Down

0 comments on commit b9a9dbf

Please sign in to comment.