-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Assertion `Buffer::HasInstance(args[4])' failed #2042
Comments
it was not the fault of pupeteer, but of |
@VinSpee |
@Aendrew here's my working example: /* eslint-env jest */
import Button from './';
describe('<Button />', () => {
let browser;
beforeAll(async () => {
browser = await puppeteer.launch({
ignoreHTTPSErrors: true,
});
});
afterAll(async () => {
await browser.close();
});
it('when given a child, it should render', () => {
const actual = shallow(
<Button>
Act now
</Button>,
);
expect(actual).toMatchSnapshot();
});
it('when given a child, it should match the image snapshot', async () => {
const page = await browser.newPage();
await page.goto('http://localhost:8000/sandbox');
const button = await page.$('#sample-button');
const image = await button.screenshot();
expect(image).toMatchImageSnapshot();
});
it('when hovered, it should match the image snapshot', async () => {
const page = await browser.newPage();
await page.goto('http://localhost:8000/sandbox');
const button = await page.$('#sample-button');
await page.hover('#sample-button');
const image = await button.screenshot();
expect(image).toMatchImageSnapshot();
});
}); |
I opened an issue |
The original issue is in the lukeapage/pngjs which uses internal node stream private variables which was changed in the node v9. (nodejs/node@add4b0a#diff-e676e0d24e582043647fd35a459ca91fL253) pngjs/pngjs#108 fixes pngjs sync method test cases for all node versions upto v9 but the async test cases still fails. |
What steps will reproduce the problem?
What is the expected result?
a screenshot is taken
What happens instead?
a crypitc error
first-time user - any ideas what might be happening? I've tried with system node and
nvm
, same error. I tried with the latest version ofpuppeteer
and@next
The text was updated successfully, but these errors were encountered: