Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

axe-playwright

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axe-playwright - npm Package Compare versions

Comparing version 1.2.1 to 1.2.3

2

dist/index.d.ts

@@ -55,3 +55,3 @@ import { Page } from 'playwright';

*/
export declare const checkA11y: (page: Page, context?: ElementContext | undefined, axeOptions?: AxeOptions | undefined, skipFailures?: boolean, reporter?: Reporter | 'default' | 'v2', options?: Options | undefined) => Promise<void>;
export declare const checkA11y: (page: Page, context?: ElementContext | undefined, axeOptions?: AxeOptions | undefined, skipFailures?: boolean, reporter?: Reporter | 'default' | 'html' | 'v2', options?: Options | undefined) => Promise<void>;
export { DefaultTerminalReporter };

@@ -108,7 +108,2 @@ "use strict";

const violations = yield (0, exports.getViolations)(page, context, axeOptions === null || axeOptions === void 0 ? void 0 : axeOptions.axeOptions);
if (violations.length > 0) {
yield (0, axe_html_reporter_1.createHtmlReport)({ results: { violations }, options });
}
else
console.log("There were no violations to save in report");
const impactedViolations = (0, utils_1.getImpactedViolations)(violations, axeOptions === null || axeOptions === void 0 ? void 0 : axeOptions.includedImpacts);

@@ -122,9 +117,17 @@ let reporterWithOptions;

}
else if (reporter === 'html') {
if (violations.length > 0) {
yield (0, axe_html_reporter_1.createHtmlReport)({ results: { violations }, options });
}
else
console.log("There were no violations to save in report");
}
else {
reporterWithOptions = reporter;
}
yield (0, exports.reportViolations)(impactedViolations, reporterWithOptions);
if (reporter !== 'v2')
if (reporter !== 'html')
yield (0, exports.reportViolations)(impactedViolations, reporterWithOptions);
if (reporter === 'v2' || reporter !== 'html')
(0, utils_1.testResultDependsOnViolations)(impactedViolations, skipFailures);
});
exports.checkA11y = checkA11y;
{
"name": "axe-playwright",
"version": "1.2.1",
"version": "1.2.3",
"description": "Custom Playwright commands to inject axe-core and test for a11y",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -123,4 +123,6 @@ ![logo](./docs/logo.png)

A class instance that implements the `Reporter` interface or values `default` and `v2`. Custom reporter instances can be supplied to override default reporting behaviour dictated by `DefaultTerminalReporter` set by the value `default`. `v2` is the new TerminalReporter inspired by the reports from [jest-axe](https://github.com/nickcolley/jest-axe).
A class instance that implements the `Reporter` interface or values `default`, `v2` and `html`. Custom reporter instances can be supplied to override default reporting behaviour dictated by `DefaultTerminalReporter` set by the value `default`. `v2` is the new TerminalReporter inspired by the reports from [jest-axe](https://github.com/nickcolley/jest-axe). `html` reporter will generate external HTML file.
Note! `html` reporter will disable printed to logs violations.
##### skipFailures (optional, defaults to false)

@@ -127,0 +129,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc