diff --git a/test/.eslintrc b/test/.eslintrc
index 3112d2ce0e..a96512db75 100644
--- a/test/.eslintrc
+++ b/test/.eslintrc
@@ -1,7 +1,11 @@
{
"extends": ["prettier"],
+ "parserOptions":{
+ "ecmaVersion": 5
+ },
"env": {
- "browser": true
+ "browser": true,
+ "es6": false
},
"globals": {
"describe": true,
diff --git a/test/checks/lists/dlitem.js b/test/checks/lists/dlitem.js
index 674be8e23e..5ac5ba103e 100644
--- a/test/checks/lists/dlitem.js
+++ b/test/checks/lists/dlitem.js
@@ -66,7 +66,7 @@ describe('dlitem', function() {
});
it('returns true if the dd/dt is in a div with a dl as grandparent', function() {
- const nodeNames = ['dd', 'dt'];
+ var nodeNames = ['dd', 'dt'];
nodeNames.forEach(function(nodeName) {
var checkArgs = checkSetup(
'
<' +
@@ -80,7 +80,7 @@ describe('dlitem', function() {
});
it('returns false if the dd/dt is in a div with a role with a dl as grandparent with a list role', function() {
- const nodeNames = ['dd', 'dt'];
+ var nodeNames = ['dd', 'dt'];
nodeNames.forEach(function(nodeName) {
var checkArgs = checkSetup(
'
<' +
@@ -94,7 +94,7 @@ describe('dlitem', function() {
});
it('returns false if the dd/dt is in a div[role=presentation] with a dl as grandparent', function() {
- const nodeNames = ['dd', 'dt'];
+ var nodeNames = ['dd', 'dt'];
nodeNames.forEach(function(nodeName) {
var checkArgs = checkSetup(
'
<' +
@@ -108,7 +108,7 @@ describe('dlitem', function() {
});
it('returns false if the dd/dt is in a div[role=none] with a dl as grandparent', function() {
- const nodeNames = ['dd', 'dt'];
+ var nodeNames = ['dd', 'dt'];
nodeNames.forEach(function(nodeName) {
var checkArgs = checkSetup(
'
<' +
diff --git a/test/checks/mobile/css-orientation-lock.js b/test/checks/mobile/css-orientation-lock.js
index 5ac3d94904..93ba8fc058 100644
--- a/test/checks/mobile/css-orientation-lock.js
+++ b/test/checks/mobile/css-orientation-lock.js
@@ -7,6 +7,7 @@ describe('css-orientation-lock tests', function() {
'Dynamic document for CSS Orientation Lock tests'
);
var isIE11 = axe.testUtils.isIE11;
+ var isPhantom = window.PHANTOMJS ? true : false;
afterEach(function() {
checks['css-orientation-lock'] = origCheck;
@@ -30,7 +31,7 @@ describe('css-orientation-lock tests', function() {
};
function getSheet(data) {
- const style = dynamicDoc.createElement('style');
+ var style = dynamicDoc.createElement('style');
style.type = 'text/css';
style.appendChild(dynamicDoc.createTextNode(data));
dynamicDoc.head.appendChild(style);
@@ -220,7 +221,7 @@ describe('css-orientation-lock tests', function() {
});
// This currently breaks in IE11
- (isIE11 ? it.skip : it)(
+ (isIE11 || isPhantom ? it.skip : it)(
'returns false if TRANSFORM style applied is ROTATE, and is divisible by 90 and not divisible by 180',
function() {
var actual = checks['css-orientation-lock'].evaluate.call(
diff --git a/test/commons/aria/arialabel-text.js b/test/commons/aria/arialabel-text.js
index 08192b786b..392314e7b0 100644
--- a/test/commons/aria/arialabel-text.js
+++ b/test/commons/aria/arialabel-text.js
@@ -18,7 +18,7 @@ describe('aria.arialabelText', function() {
var node = document.createElement('div');
var label = ' my label ';
node.setAttribute('aria-label', label);
- const vNode = { actualNode: node };
+ var vNode = { actualNode: node };
assert.equal(aria.arialabelText(vNode), label);
});
diff --git a/test/commons/aria/is-aria-role-allowed-on-element.js b/test/commons/aria/is-aria-role-allowed-on-element.js
index f6e3c95d39..623fc741cb 100644
--- a/test/commons/aria/is-aria-role-allowed-on-element.js
+++ b/test/commons/aria/is-aria-role-allowed-on-element.js
@@ -240,11 +240,11 @@ describe('aria.isAriaRoleAllowedOnElement', function() {
it('returns false, ensure evaluateRoleForElement in lookupTable is invoked', function() {
var overrideInvoked = false;
axe.commons.aria.lookupTable.evaluateRoleForElement = {
- IMG: ({ node, out }) => {
+ IMG: function(options) {
overrideInvoked = true;
- assert.isDefined(node);
- assert.equal(node.nodeName.toUpperCase(), 'IMG');
- assert.isBoolean(out);
+ assert.isDefined(options.node);
+ assert.equal(options.node.nodeName.toUpperCase(), 'IMG');
+ assert.isBoolean(options.out);
return false;
}
};
@@ -261,10 +261,10 @@ describe('aria.isAriaRoleAllowedOnElement', function() {
it('returns false if element with role MENU type context', function() {
var overrideInvoked = false;
axe.commons.aria.lookupTable.evaluateRoleForElement = {
- LI: ({ node }) => {
+ LI: function(options) {
overrideInvoked = true;
- assert.isDefined(node);
- assert.equal(node.nodeName.toUpperCase(), 'LI');
+ assert.isDefined(options.node);
+ assert.equal(options.node.nodeName.toUpperCase(), 'LI');
return false;
}
};
diff --git a/test/commons/matches/from-definition.js b/test/commons/matches/from-definition.js
index 6cc9df5b77..969c9aec90 100644
--- a/test/commons/matches/from-definition.js
+++ b/test/commons/matches/from-definition.js
@@ -13,7 +13,7 @@ describe('matches.fromDefinition', function() {
it('matches a definition with a `nodeName` property', function() {
fixture.innerHTML = '
foo
';
- const matchers = [
+ var matchers = [
'div',
['div', 'span'],
/div/,
@@ -37,7 +37,7 @@ describe('matches.fromDefinition', function() {
it('matches a definition with an `attributes` property', function() {
fixture.innerHTML = '