Skip to content

Commit

Permalink
fix(getStandards): Read standards from utils (#2903)
Browse files Browse the repository at this point in the history
* fix(getStandards): Read standards from utils

* Update lib/core/utils/get-standards.js

Co-authored-by: Steven Lambert <[email protected]>

Co-authored-by: Steven Lambert <[email protected]>
  • Loading branch information
WilcoFiers and straker authored May 2, 2021
1 parent b1a7387 commit f1a0368
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/core/utils/get-standards.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import standards from '../../standards'
import clone from './clone'

export default function getStandards() {
return clone(standards);
}
1 change: 1 addition & 0 deletions lib/core/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export { default as getScrollState } from './get-scroll-state';
export { default as getScroll } from './get-scroll';
export { default as getShadowSelector } from './get-shadow-selector';
export { default as getSelector, getSelectorData } from './get-selector';
export { default as getStandards } from './get-standards';
export { default as getStyleSheetFactory } from './get-stylesheet-factory';
export { default as getXpath } from './get-xpath';
export { default as getAncestry } from './get-ancestry';
Expand Down
11 changes: 11 additions & 0 deletions test/core/utils/get-standards.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
describe('axe.utils.getStandards', function () {
it('returns the standards object', function () {
var standards = axe.utils.getStandards();
assert.hasAnyKeys(standards, [
'ariaAttrs',
'ariaRoles',
'htmlElms',
'cssColors'
]);
});
});

0 comments on commit f1a0368

Please sign in to comment.