I get the above error when I try and click on an element in a page.

I have added the following config to my package json as instructed:

I then wrote the following tests:

The first one passes so I'm set up properly, does anyone know why the toClick function is failing?
It looks like expectPuppeteer is not working, it could be because you are using dom-testing-library/extend-expect. I propose you to use expect-puppeteer as standalone.
import expectPuppeteer from 'expect-puppeteer'
expectPuppeteer(page).toClick(...)
works like a charm. Thank you.
Most helpful comment
It looks like
expectPuppeteeris not working, it could be because you are usingdom-testing-library/extend-expect. I propose you to useexpect-puppeteeras standalone.