You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm use archive with only one file with 5000K content length.
main test:
import{createReadStream}from'fs';import*aspathfrom'path';import*asunzipperfrom'unzipper';import{checkInvalideByte}from'../string-helper';jest.setTimeout(1000*30);constTEST_ARCHIVE_PATH=path.join(__dirname,'./mock_data/archive-with-russian-chars.zip',);describe('archive-with-cyrillic -chars',()=>{describe('unzipper lib test',()=>{it('should incorrect decode when use readable stream',async()=>{conststream=createReadStream(TEST_ARCHIVE_PATH);constended=newPromise((resolve,reject)=>{stream.on('end',resolve);stream.on('error',reject);constunzipStream=unzipper.ParseOne();unzipStream.on('data',(chunk)=>{constline=chunk.toString();checkInvalideByte(line).catch(reject);});stream.pipe(unzipStream);});awaitexpect(ended).rejects.toThrow();});});});
Hello! I made wrapped class around library and append my own decoder to
stream. And I check end of bytes on data and if it incorrect I push its to
temp store and try redecode with new data event.
вт, 8 нояб. 2022 г., 07:11 Luis Bajana ***@***.***>:
I'm use archive with only one file with 5000K content length.
main test:
string-helper.ts
The text was updated successfully, but these errors were encountered: