diff --git a/tests/results/a11y-tests.js b/tests/results/a11y-tests.js index c5293265..ca01f21f 100644 --- a/tests/results/a11y-tests.js +++ b/tests/results/a11y-tests.js @@ -1,25 +1,25 @@ -module('Results - Accessibility'); - -var $ = require('jquery'); - -var Options = require('select2/options'); - -var Results = require('select2/results'); - -test('role of results should be a listbox', function (assert) { - var results = new Results($(''), new Options({})); - - var $results = results.render(); - - assert.equal($results.attr('role'), 'listbox'); -}); - -test('multiple select should have aria-multiselectable', function (assert) { - var results = new Results($(''), new Options({ - multiple: true - })); - - var $results = results.render(); - - assert.equal($results.attr('aria-multiselectable'), 'true'); -}); +module('Results - Accessibility'); + +var $ = require('jquery'); + +var Options = require('select2/options'); + +var Results = require('select2/results'); + +test('role of results should be a listbox', function (assert) { + var results = new Results($(''), new Options({})); + + var $results = results.render(); + + assert.equal($results.attr('role'), 'listbox'); +}); + +test('multiple select should have aria-multiselectable', function (assert) { + var results = new Results($(''), new Options({ + multiple: true + })); + + var $results = results.render(); + + assert.equal($results.attr('aria-multiselectable'), 'true'); +}); diff --git a/tests/utils/data-tests.js b/tests/utils/data-tests.js index b557fe09..90f0f8b9 100644 --- a/tests/utils/data-tests.js +++ b/tests/utils/data-tests.js @@ -1,36 +1,36 @@ -module('Utils - RemoveData'); - -var $ = require('jquery'); -var Utils = require('select2/utils'); - -test('The data-select2-id attribute is removed', function (assert) { - var $element = $(''); - - Utils.RemoveData($element[0]); - - assert.notEqual( - $element.attr('data-select2-id'), - 'test', - 'The internal attribute was not removed when the data was cleared' - ); -}); - -test('The internal cache for the element is cleared', function (assert) { - var $element = $(''); - - Utils.__cache.test = { - 'foo': 'bar' - }; - - Utils.RemoveData($element[0]); - - assert.equal(Utils.__cache.test, null, 'The cache should now be empty'); -}); - -test('Calling it on an element without data works', function (assert) { - assert.expect(0); - - var $element = $(''); - - Utils.RemoveData($element[0]); +module('Utils - RemoveData'); + +var $ = require('jquery'); +var Utils = require('select2/utils'); + +test('The data-select2-id attribute is removed', function (assert) { + var $element = $(''); + + Utils.RemoveData($element[0]); + + assert.notEqual( + $element.attr('data-select2-id'), + 'test', + 'The internal attribute was not removed when the data was cleared' + ); +}); + +test('The internal cache for the element is cleared', function (assert) { + var $element = $(''); + + Utils.__cache.test = { + 'foo': 'bar' + }; + + Utils.RemoveData($element[0]); + + assert.equal(Utils.__cache.test, null, 'The cache should now be empty'); +}); + +test('Calling it on an element without data works', function (assert) { + assert.expect(0); + + var $element = $(''); + + Utils.RemoveData($element[0]); }); \ No newline at end of file