1
0
mirror of synced 2025-02-16 12:03:14 +03:00

Converting tests to unix newlines

This commit is contained in:
Kevin Brown 2019-08-07 21:25:01 -04:00
parent 4afa7f88a4
commit 9ad1b9107b
2 changed files with 60 additions and 60 deletions

View File

@ -1,25 +1,25 @@
module('Results - Accessibility'); module('Results - Accessibility');
var $ = require('jquery'); var $ = require('jquery');
var Options = require('select2/options'); var Options = require('select2/options');
var Results = require('select2/results'); var Results = require('select2/results');
test('role of results should be a listbox', function (assert) { test('role of results should be a listbox', function (assert) {
var results = new Results($('<select></select>'), new Options({})); var results = new Results($('<select></select>'), new Options({}));
var $results = results.render(); var $results = results.render();
assert.equal($results.attr('role'), 'listbox'); assert.equal($results.attr('role'), 'listbox');
}); });
test('multiple select should have aria-multiselectable', function (assert) { test('multiple select should have aria-multiselectable', function (assert) {
var results = new Results($('<select></select>'), new Options({ var results = new Results($('<select></select>'), new Options({
multiple: true multiple: true
})); }));
var $results = results.render(); var $results = results.render();
assert.equal($results.attr('aria-multiselectable'), 'true'); assert.equal($results.attr('aria-multiselectable'), 'true');
}); });

View File

@ -1,36 +1,36 @@
module('Utils - RemoveData'); module('Utils - RemoveData');
var $ = require('jquery'); var $ = require('jquery');
var Utils = require('select2/utils'); var Utils = require('select2/utils');
test('The data-select2-id attribute is removed', function (assert) { test('The data-select2-id attribute is removed', function (assert) {
var $element = $('<select data-select2-id="test"></select>'); var $element = $('<select data-select2-id="test"></select>');
Utils.RemoveData($element[0]); Utils.RemoveData($element[0]);
assert.notEqual( assert.notEqual(
$element.attr('data-select2-id'), $element.attr('data-select2-id'),
'test', 'test',
'The internal attribute was not removed when the data was cleared' 'The internal attribute was not removed when the data was cleared'
); );
}); });
test('The internal cache for the element is cleared', function (assert) { test('The internal cache for the element is cleared', function (assert) {
var $element = $('<select data-select2-id="test"></select>'); var $element = $('<select data-select2-id="test"></select>');
Utils.__cache.test = { Utils.__cache.test = {
'foo': 'bar' 'foo': 'bar'
}; };
Utils.RemoveData($element[0]); Utils.RemoveData($element[0]);
assert.equal(Utils.__cache.test, null, 'The cache should now be empty'); assert.equal(Utils.__cache.test, null, 'The cache should now be empty');
}); });
test('Calling it on an element without data works', function (assert) { test('Calling it on an element without data works', function (assert) {
assert.expect(0); assert.expect(0);
var $element = $('<select></select>'); var $element = $('<select></select>');
Utils.RemoveData($element[0]); Utils.RemoveData($element[0]);
}); });