.toMatch docs need to be updated?
fregante opened this issue · 0 comments
fregante commented
After updating to v8, I think the toMatch
API was updated since I don't see it here: https://github.com/argos-ci/jest-puppeteer/blob/e9620e4e9719c36e08bb8e92d714341844993b8d/packages/expect-puppeteer/README.md#api
● static: tab › should load page
expect(received).toMatch(expected)
Matcher error: received value must be a string
Received has type: object
Received has value: {"emitter": {"all": Map {"pageerror" => [[Function handlePageError]]}, "emit": [Function emit], "off": [Function off], "on": [Function on]}, "eventsMap": Map {"pageerror" => [[Function handlePageError]]}}
36 |
37 | it('should load page', async () => {
> 38 | await expect(page).toMatch('Parent page');
| ^
39 | });
40 |
41 | it('should load the content script, once', async () => {
at Object.toMatch (test/browser.js:38:22)
But the readme still mentions this exact string-based usage:
Lines 36 to 38 in e9620e4