@percy/playwright 1.0.6-beta.1 → 1.0.6-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -9,7 +9,7 @@ const ENV_INFO = `${playwrightPkg.name}/${playwrightPkg.version}`;
9
9
  const log = utils.logger('playwright');
10
10
 
11
11
  // Take a DOM snapshot and post it to the snapshot endpoint
12
- async function percySnapshot(page, name, options) {
12
+ const percySnapshot = async function(page, name, options) {
13
13
  if (!page) throw new Error('A Playwright `page` object is required.');
14
14
  if (!name) throw new Error('The `name` argument is required.');
15
15
  if (!(await utils.isPercyEnabled())) return;
@@ -39,10 +39,10 @@ async function percySnapshot(page, name, options) {
39
39
  log.error(`Could not take DOM snapshot "${name}"`);
40
40
  log.error(err);
41
41
  }
42
- }
42
+ };
43
43
 
44
44
  // Takes Playwright screenshot with Automate
45
- async function percyScreenshot(page, name, options) {
45
+ const percyScreenshot = async function(page, name, options) {
46
46
  if (!page) throw new Error('A Playwright `page` object is required.');
47
47
  if (!name) throw new Error('The `name` argument is required.');
48
48
  if (!(await utils.isPercyEnabled())) return;
@@ -71,6 +71,10 @@ async function percyScreenshot(page, name, options) {
71
71
  log.error(`Could not take percy screenshot "${name}"`);
72
72
  log.error(err);
73
73
  }
74
- }
74
+ };
75
75
 
76
- module.exports = { percySnapshot, percyScreenshot, CLIENT_INFO, ENV_INFO };
76
+ module.exports = percySnapshot;
77
+ module.exports.percySnapshot = percySnapshot;
78
+ module.exports.percyScreenshot = percyScreenshot;
79
+ module.exports.CLIENT_INFO = CLIENT_INFO;
80
+ module.exports.ENV_INFO = ENV_INFO;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@percy/playwright",
3
3
  "description": "Playwright client library for visual testing with Percy",
4
- "version": "1.0.6-beta.1",
4
+ "version": "1.0.6-beta.2",
5
5
  "license": "MIT",
6
6
  "author": "Perceptual Inc.",
7
7
  "repository": "https://github.com/percy/percy-playwright",