lint: stricter linting rules

This commit is contained in:
Adhiraj Singh
2022-03-01 16:32:14 +05:30
parent c00c3da313
commit de7d1002a9
39 changed files with 534 additions and 526 deletions

View File

@@ -39,7 +39,7 @@ describe('Media Download Tests', () => {
it('should download a full encrypted media correctly', async() => {
for(const { type, message, plaintext } of TEST_VECTORS) {
const readPipe = await downloadContentFromMessage(message, type)
let buffer = Buffer.alloc(0)
for await (const read of readPipe) {
buffer = Buffer.concat([ buffer, read ])
@@ -53,13 +53,13 @@ describe('Media Download Tests', () => {
for(const { type, message, plaintext } of TEST_VECTORS) {
// check all edge cases
const ranges = [
{ startByte: 51, endByte: plaintext.length-100 }, // random numbers
{ startByte: 51, endByte: plaintext.length - 100 }, // random numbers
{ startByte: 1024, endByte: 2038 }, // larger random multiples of 16
{ startByte: 1, endByte: plaintext.length-1 } // borders
{ startByte: 1, endByte: plaintext.length - 1 } // borders
]
for(const range of ranges) {
const readPipe = await downloadContentFromMessage(message, type, range)
let buffer = Buffer.alloc(0)
for await (const read of readPipe) {
buffer = Buffer.concat([ buffer, read ])