pa11y-runner-htmlcs
Advanced tools
Comparing version 0.1.0 to 0.2.0
# Changelog | ||
## 0.2.0 (2018-05-24) | ||
* Updates to match new Pa11y behaviour, returning element rather than selector and context | ||
## 0.1.0 (2018-05-21) | ||
* Initial release |
@@ -28,3 +28,3 @@ 'use strict'; | ||
*/ | ||
runner.run = async (options, pa11y) => { | ||
runner.run = async options => { | ||
@@ -90,4 +90,3 @@ /** | ||
type: issueTypeMap[issue.type] || 'unknown', | ||
context: pa11y.getElementContext(issue.element), | ||
selector: pa11y.getElementSelector(issue.element) | ||
element: issue.element | ||
}; | ||
@@ -94,0 +93,0 @@ } |
{ | ||
"name": "pa11y-runner-htmlcs", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "A HTML CodeSniffer runner for Pa11y", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -86,6 +86,3 @@ 'use strict'; | ||
}; | ||
pa11y = { | ||
getElementContext: sinon.stub().returns('mock-element-context'), | ||
getElementSelector: sinon.stub().returns('mock-element-selector') | ||
}; | ||
pa11y = {}; | ||
resolvedValue = await runner.run(options, pa11y); | ||
@@ -104,18 +101,2 @@ }); | ||
it('generates context for each issue element', () => { | ||
assert.callCount(pa11y.getElementContext, 4); | ||
assert.calledWithExactly(pa11y.getElementContext.getCall(0), 'mock-element-1'); | ||
assert.calledWithExactly(pa11y.getElementContext.getCall(1), 'mock-element-2'); | ||
assert.calledWithExactly(pa11y.getElementContext.getCall(2), 'mock-element-3'); | ||
assert.calledWithExactly(pa11y.getElementContext.getCall(3), 'mock-element-4'); | ||
}); | ||
it('generates selectors for each issue element', () => { | ||
assert.callCount(pa11y.getElementSelector, 4); | ||
assert.calledWithExactly(pa11y.getElementSelector.getCall(0), 'mock-element-1'); | ||
assert.calledWithExactly(pa11y.getElementSelector.getCall(1), 'mock-element-2'); | ||
assert.calledWithExactly(pa11y.getElementSelector.getCall(2), 'mock-element-3'); | ||
assert.calledWithExactly(pa11y.getElementSelector.getCall(3), 'mock-element-4'); | ||
}); | ||
it('resolves with processed and normalised issues', () => { | ||
@@ -127,4 +108,3 @@ assert.deepEqual(resolvedValue, [ | ||
type: 'error', | ||
context: 'mock-element-context', | ||
selector: 'mock-element-selector' | ||
element: 'mock-element-1' | ||
}, | ||
@@ -135,4 +115,3 @@ { | ||
type: 'warning', | ||
context: 'mock-element-context', | ||
selector: 'mock-element-selector' | ||
element: 'mock-element-2' | ||
}, | ||
@@ -143,4 +122,3 @@ { | ||
type: 'notice', | ||
context: 'mock-element-context', | ||
selector: 'mock-element-selector' | ||
element: 'mock-element-3' | ||
}, | ||
@@ -151,4 +129,3 @@ { | ||
type: 'unknown', | ||
context: 'mock-element-context', | ||
selector: 'mock-element-selector' | ||
element: 'mock-element-4' | ||
} | ||
@@ -155,0 +132,0 @@ ]); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
130269
731