Skip to content
New issue

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

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

Already on GitHub? # to your account

Buffers support regressioin on 5.0.1 #62

Closed
smhutch opened this issue Jun 10, 2019 · 2 comments
Closed

Buffers support regressioin on 5.0.1 #62

smhutch opened this issue Jun 10, 2019 · 2 comments
Labels

Comments

@smhutch
Copy link

smhutch commented Jun 10, 2019

In v5.0.1 there appears to be no support for image Buffers.

Given this code: https://cl.ly/4b2774

pixelmatch/index.js

Lines 83 to 85 in 197e8e2

function isPixelData(arr) {
return arr instanceof Uint8Array || arr instanceof Uint8ClampedArray;
}

@mourner
Copy link
Member

mourner commented Jun 10, 2019

What version of Node are you running this on? Can you share a full minimal test case (e.g. as a Gist)? Buffer is inherited from Uint8Array so this holds true:

image

@mourner
Copy link
Member

mourner commented Jun 10, 2019

Looking at this further, this might be related to this Jest bug jestjs/jest#4422

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants