Socket
Socket
Sign inDemoInstall

@axe-core/playwright

Package Overview
Dependencies
Maintainers
4
Versions
373
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axe-core/playwright - npm Package Compare versions

Comparing version 4.2.3-alpha.184 to 4.2.3-alpha.187

22

dist/index.d.ts

@@ -15,5 +15,5 @@ import type { RunOptions, AxeResults } from 'axe-core';

* @param String selector
* @returns AxeBuilder
* @returns this
*/
include(selector: string): AxeBuilder;
include(selector: string): this;
/**

@@ -23,5 +23,5 @@ * Selector to exclude in analysis.

* @param String selector
* @returns AxeBuilder
* @returns this
*/
exclude(selector: string): AxeBuilder;
exclude(selector: string): this;
/**

@@ -32,3 +32,3 @@ * Set options to be passed into axe-core

*/
options(options: RunOptions): AxeBuilder;
options(options: RunOptions): this;
/**

@@ -38,5 +38,5 @@ * Limit analysis to only the specified rules.

* @param String|Array rules
* @returns AxeBuilder
* @returns this
*/
withRules(rules: string | string[]): AxeBuilder;
withRules(rules: string | string[]): this;
/**

@@ -46,11 +46,11 @@ * Limit analysis to only specified tags.

* @param String|Array tags
* @returns AxeBuilder
* @returns this
*/
withTags(tags: string | string[]): AxeBuilder;
withTags(tags: string | string[]): this;
/**
* Set the list of rules to skip when running an analysis.
* @param String|Array rules
* @returns AxeBuilder
* @returns this
*/
disableRules(rules: string | string[]): AxeBuilder;
disableRules(rules: string | string[]): this;
/**

@@ -57,0 +57,0 @@ * Use frameMessenger with <same_origin_only>

@@ -59,3 +59,3 @@ "use strict";

* @param String selector
* @returns AxeBuilder
* @returns this
*/

@@ -70,3 +70,3 @@ AxeBuilder.prototype.include = function (selector) {

* @param String selector
* @returns AxeBuilder
* @returns this
*/

@@ -90,3 +90,3 @@ AxeBuilder.prototype.exclude = function (selector) {

* @param String|Array rules
* @returns AxeBuilder
* @returns this
*/

@@ -107,3 +107,3 @@ AxeBuilder.prototype.withRules = function (rules) {

* @param String|Array tags
* @returns AxeBuilder
* @returns this
*/

@@ -123,3 +123,3 @@ AxeBuilder.prototype.withTags = function (tags) {

* @param String|Array rules
* @returns AxeBuilder
* @returns this
*/

@@ -126,0 +126,0 @@ AxeBuilder.prototype.disableRules = function (rules) {

{
"name": "@axe-core/playwright",
"version": "4.2.3-alpha.184+f9d021b",
"version": "4.2.3-alpha.187+5f1d173",
"description": "Provides a method to inject and analyze web pages using axe",

@@ -80,3 +80,3 @@ "contributors": [

},
"gitHead": "f9d021b49487e2a0f804f61e9b6e09a26b69a6e4"
"gitHead": "5f1d17319fe29af94e348d6054e66098ed075c10"
}

@@ -41,6 +41,6 @@ import * as fs from 'fs';

* @param String selector
* @returns AxeBuilder
* @returns this
*/
public include(selector: string): AxeBuilder {
public include(selector: string): this {
this.includes.push(selector);

@@ -54,6 +54,6 @@ return this;

* @param String selector
* @returns AxeBuilder
* @returns this
*/
public exclude(selector: string): AxeBuilder {
public exclude(selector: string): this {
this.excludes.push(selector);

@@ -69,3 +69,3 @@ return this;

public options(options: RunOptions): AxeBuilder {
public options(options: RunOptions): this {
this.option = options;

@@ -79,6 +79,6 @@ return this;

* @param String|Array rules
* @returns AxeBuilder
* @returns this
*/
public withRules(rules: string | string[]): AxeBuilder {
public withRules(rules: string | string[]): this {
rules = Array.isArray(rules) ? rules : [rules];

@@ -99,6 +99,6 @@ /* istanbul ignore next */

* @param String|Array tags
* @returns AxeBuilder
* @returns this
*/
public withTags(tags: string | string[]): AxeBuilder {
public withTags(tags: string | string[]): this {
tags = Array.isArray(tags) ? tags : [tags];

@@ -117,6 +117,6 @@ /* istanbul ignore next */

* @param String|Array rules
* @returns AxeBuilder
* @returns this
*/
public disableRules(rules: string | string[]): AxeBuilder {
public disableRules(rules: string | string[]): this {
rules = Array.isArray(rules) ? rules : [rules];

@@ -123,0 +123,0 @@ /* istanbul ignore next */

@@ -20,12 +20,16 @@ import 'mocha';

const axeTestFixtures = path.resolve(__dirname, 'fixtures');
const externalPath = path.resolve(axeTestFixtures, 'external');
const axeLegacySource = fs.readFileSync(
path.resolve(axeTestFixtures, 'external', 'axe-core@legacy.js'),
path.join(externalPath, 'axe-core@legacy.js'),
'utf-8'
);
const axeCrashPath = path.resolve(
axeTestFixtures,
'external',
'axe-crasher.js'
const axeCrasherSource = fs.readFileSync(
path.join(externalPath, 'axe-crasher.js'),
'utf8'
);
const axeCrasherSource = fs.readFileSync(axeCrashPath, 'utf8');
const axeForceLegacy = fs.readFileSync(
path.join(externalPath, 'axe-force-legacy.js'),
'utf8'
);
before(async () => {

@@ -148,2 +152,16 @@ const app = express();

});
it('returns the same results from runPartial as from legacy mode', async () => {
await page.goto(`${addr}/nested-iframes.html`);
const legacyResults = await new AxeBuilder({
page,
axeSource: axeSource + axeForceLegacy
}).analyze();
assert.equal(legacyResults.testEngine.name, 'axe-legacy');
const normalResults = await new AxeBuilder({ page, axeSource }).analyze();
normalResults.timestamp = legacyResults.timestamp;
normalResults.testEngine.name = legacyResults.testEngine.name;
assert.deepEqual(normalResults, legacyResults);
});
});

@@ -150,0 +168,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