diff --git a/lib/core/utils/get-standards.js b/lib/core/utils/get-standards.js new file mode 100644 index 0000000000..d902832f87 --- /dev/null +++ b/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); +} diff --git a/lib/core/utils/index.js b/lib/core/utils/index.js index efb1ae436a..d15cb8c763 100644 --- a/lib/core/utils/index.js +++ b/lib/core/utils/index.js @@ -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'; diff --git a/test/core/utils/get-standards.js b/test/core/utils/get-standards.js new file mode 100644 index 0000000000..3a93db63c5 --- /dev/null +++ b/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' + ]); + }); +});