Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib not working with jest / jest regression #4

Closed
majirosstefan opened this issue Jun 22, 2021 · 1 comment
Closed

lib not working with jest / jest regression #4

majirosstefan opened this issue Jun 22, 2021 · 1 comment

Comments

@majirosstefan
Copy link

Using React Native v.64.1, and Jest ^26.6.3", it throws an error during running tests,
probably because of Jest regression - more here:
jestjs/jest#7780

This the stack of error:

TypeError: Not a string or buffer
        at zlibBufferSync (/Users/stefanmajiros/green-pass-reader/GreenPassIssuer/node_modules/react-zlib-js/index.js:1935:39)
        at Object.inflateSync (/Users/stefanmajiros/green-pass-reader/GreenPassIssuer/node_modules/react-zlib-js/index.js:1864:10)
        at decompressZlib (/Users/stefanmajiros/green-pass-reader/GreenPassIssuer/src/qrParser/zlibDecompressor.js:8:29)

If I comment this line
if (!Buffer.isBuffer(buffer)) throw new TypeError('Not a string or buffer');
test pass.

@kpanuragh
Copy link
Owner

Buffer in react-zlib-js not node native Buffer class its pure JS implementation of Buffer so You can't test buffer class with Node version of Buffer

Repository owner deleted a comment from xhirazi Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants