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 <2433219+straker@users.noreply.github.com>

Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
  • Loading branch information
WilcoFiers and straker committed May 18, 2021
1 parent e034166 commit 52ad4c6
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
@@ -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
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
@@ -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 52ad4c6

Please sign in to comment.