mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
lint: stricter linting rules
This commit is contained in:
@@ -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 ])
|
||||
|
||||
Reference in New Issue
Block a user