testaro 59.0.0 → 59.0.1

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/package.json +1 -1
  2. package/run.js +9 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "59.0.0",
3
+ "version": "59.0.1",
4
4
  "description": "Run 1000 web accessibility tests from 11 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/run.js CHANGED
@@ -214,10 +214,15 @@ const goTo = async (report, page, url, timeout, waitUntil) => {
214
214
  // Closes the current browser.
215
215
  const browserClose = async () => {
216
216
  if (browser) {
217
- let contexts = browser.contexts();
218
- for (const context of contexts) {
219
- await context.close();
220
- contexts = browser.contexts();
217
+ for (const context of browser.contexts()) {
218
+ try {
219
+ await context.close();
220
+ }
221
+ catch(error) {
222
+ console.log(
223
+ `ERROR trying to close context: ${error.message.slice(0, 200).replace(/\n.+/s, '')}`
224
+ );
225
+ }
221
226
  }
222
227
  await browser.close();
223
228
  browser = null;