@axe-core/puppeteer 4.7.2 → 4.7.3-alpha.398
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.
- package/README.md +8 -7
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@ Previous versions of this program were maintained at [dequelabs/axe-puppeteer](h
|
|
|
8
8
|
|
|
9
9
|
Install [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already.
|
|
10
10
|
|
|
11
|
-
Install Puppeteer: `npm install puppeteer
|
|
11
|
+
Install Puppeteer: `npm install puppeteer`
|
|
12
12
|
|
|
13
|
-
Install axe-puppeteer
|
|
13
|
+
Install @axe-core/puppeteer: `npm install @axe-core/puppeteer`
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
@@ -25,14 +25,15 @@ const puppeteer = require('puppeteer');
|
|
|
25
25
|
(async () => {
|
|
26
26
|
const browser = await puppeteer.launch();
|
|
27
27
|
const page = await browser.newPage();
|
|
28
|
-
await page.setBypassCSP(true);
|
|
29
|
-
|
|
30
28
|
await page.goto('https://dequeuniversity.com/demo/mars/');
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
try {
|
|
31
|
+
const results = await new AxePuppeteer(page).analyze();
|
|
32
|
+
console.log(results);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
// do something with the error
|
|
35
|
+
}
|
|
34
36
|
|
|
35
|
-
await page.close();
|
|
36
37
|
await browser.close();
|
|
37
38
|
})();
|
|
38
39
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axe-core/puppeteer",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.3-alpha.398+9cb50eb",
|
|
4
4
|
"description": "Provides a chainable axe API for Puppeteer and automatically injects into all frames",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup src/index.ts --dts --format esm,cjs",
|
|
27
|
-
"test": "mocha 'test
|
|
28
|
-
"test:esm": "node esmTest.mjs",
|
|
27
|
+
"test": "mocha --timeout 60000 -r ts-node/register 'test/**.spec.ts'",
|
|
28
|
+
"test:esm": "node test/esmTest.mjs",
|
|
29
29
|
"coverage": "nyc npm run test",
|
|
30
30
|
"prepublishOnly": "npm run build"
|
|
31
31
|
},
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"functions": 85,
|
|
89
89
|
"lines": 85
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "9cb50ebb6b138cb0aa6b785bc7c826c4b9a21086"
|
|
92
92
|
}
|