1
0
mirror of synced 2024-11-21 20:46:07 +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');
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($('<select></select>'), 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($('<select></select>'), 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($('<select></select>'), 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($('<select></select>'), new Options({
multiple: true
}));
var $results = results.render();
assert.equal($results.attr('aria-multiselectable'), 'true');
});

View File

@ -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 = $('<select data-select2-id="test"></select>');
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 = $('<select data-select2-id="test"></select>');
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 = $('<select></select>');
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 = $('<select data-select2-id="test"></select>');
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 = $('<select data-select2-id="test"></select>');
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 = $('<select></select>');
Utils.RemoveData($element[0]);
});