-
Notifications
You must be signed in to change notification settings - Fork 288
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
Jest's native expect functions are broken by puppeteer-expect #17
Comments
I expected this kind of problem. I think we can find a workaround for that. Actually the problem will only occur on Two workarounds before the fix: await expect(page).toMatchElement('input') // This will wait for element to be displayed
// or
const elementHandle = await page.$('input')
expect(elementHandle === null).toBe(false) |
@neoziro The issue is that I need to use the elements elsewhere in the test. So far the only workaround I've found uses another bug which is that promises don't get resolved by expect-puppeteer:
But again, that's a bit of a hack |
OK, please be patient, I will work on this bug as soon as possible. It will be fixed before the end of week. |
I'm using expect(response.status()).toBe(200) The exception thrown:
|
I am facing this issue while trying to compare 2 strings. It is throwing error: @neoziro Any idea on this? |
I think You probably want |
@neoziro Sorry, it was a typing error, I did used I am getting same error for below codes as well, |
When I use expect-puppeteer with typescript by import ppExpect from 'expect-puppeteer'
...
await ppExpect(page).toClick(...)
expect('test').toBe('test') |
Hi, it looks like puppeteer-expect doesn't actually copy over the old jest expect's matchers. This causes a lot of problems like:
TypeError: expect(...).not.toBe is not a function
Code:
The text was updated successfully, but these errors were encountered: