expect-puppeteer
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="2.0.1"></a> | ||
## [2.0.1](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/puppeteer-expect/compare/v2.0.0...v2.0.1) (2018-03-08) | ||
### Bug Fixes | ||
* **expect-puppeteer:** fix expectMatch when body is undefined ([#9](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/puppeteer-expect/issues/9)) ([0c60970](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/puppeteer-expect/commit/0c60970)) | ||
<a name="2.0.0"></a> | ||
@@ -8,0 +19,0 @@ # [2.0.0](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/puppeteer-expect/compare/v1.1.1...v2.0.0) (2018-03-05) |
@@ -6,3 +6,3 @@ "use strict"; | ||
try { | ||
await page.waitForFunction(`document.body.textContent.match(new RegExp('${matcher}')) === null`, options); | ||
await page.waitForFunction(`document.body && document.body.textContent.match(new RegExp('${matcher}')) === null`, options); | ||
} catch (error) { | ||
@@ -9,0 +9,0 @@ throw new Error(`Text found "${matcher}"`); |
@@ -6,3 +6,3 @@ "use strict"; | ||
try { | ||
await page.waitForFunction(`document.body.textContent.match(new RegExp('${matcher}')) !== null`, options); | ||
await page.waitForFunction(`document.body && document.body.textContent.match(new RegExp('${matcher}')) !== null`, options); | ||
} catch (error) { | ||
@@ -9,0 +9,0 @@ throw new Error(`Text not found "${matcher}"`); |
{ | ||
"name": "expect-puppeteer", | ||
"description": "Assertion toolkit for Puppeteer.", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/smooth-code/jest-puppeteer/tree/master/packages/puppeteer-expect", |
13971