From 64e829e447b387dfb1af02cadab1ca380621a5cb Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 27 Aug 2019 22:56:27 -0400 Subject: [PATCH] Converting tests to unix newlines --- tests/dropdown/dropdownParent-tests.js | 166 ++++++++++++------------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/tests/dropdown/dropdownParent-tests.js b/tests/dropdown/dropdownParent-tests.js index 1ccd5b9f..1e474bda 100644 --- a/tests/dropdown/dropdownParent-tests.js +++ b/tests/dropdown/dropdownParent-tests.js @@ -1,83 +1,83 @@ -module('Dropdown - attachBody - dropdownParent option'); - -test('can be a selector string', function (assert) { - assert.expect(1); - - var $ = require('jquery'); - - var $select = $(''); - var $parent = $('
'); - - $('#qunit-fixture').append($parent); - - var Utils = require('select2/utils'); - var Options = require('select2/options'); - - var Dropdown = require('select2/dropdown'); - var AttachBody = require('select2/dropdown/attachBody'); - - var DropdownAdapter = Utils.Decorate(Dropdown, AttachBody); - - var dropdown = new DropdownAdapter($select, new Options({ - dropdownParent: '#parent' - })); - - assert.equal( - dropdown.$dropdownParent[0], - $parent[0], - 'Should be parsed using the selector as a jQuery object' - ); -}); - -test('can be a jQuery object', function (assert) { - assert.expect(1); - - var $ = require('jquery'); - - var $select = $(''); - var $parent = $('
'); - - $('#qunit-fixture').append($parent); - - var Utils = require('select2/utils'); - var Options = require('select2/options'); - - var Dropdown = require('select2/dropdown'); - var AttachBody = require('select2/dropdown/attachBody'); - - var DropdownAdapter = Utils.Decorate(Dropdown, AttachBody); - - var dropdown = new DropdownAdapter($select, new Options({ - dropdownParent: $parent - })); - - assert.equal( - dropdown.$dropdownParent[0], - $parent[0], - 'Should just take the passed in jQuery object' - ); -}); - -test('defaults to the document body', function (assert) { - assert.expect(1); - - var $ = require('jquery'); - - var $select = $(''); - - var Utils = require('select2/utils'); - var Options = require('select2/options'); - - var Dropdown = require('select2/dropdown'); - var AttachBody = require('select2/dropdown/attachBody'); - - var DropdownAdapter = Utils.Decorate(Dropdown, AttachBody); - - var dropdown = new DropdownAdapter($select, new Options({})); - - assert.equal( - dropdown.$dropdownParent[0], - document.body, - 'Should default to wrapping document.body' - ); -}); +module('Dropdown - attachBody - dropdownParent option'); + +test('can be a selector string', function (assert) { + assert.expect(1); + + var $ = require('jquery'); + + var $select = $(''); + var $parent = $('
'); + + $('#qunit-fixture').append($parent); + + var Utils = require('select2/utils'); + var Options = require('select2/options'); + + var Dropdown = require('select2/dropdown'); + var AttachBody = require('select2/dropdown/attachBody'); + + var DropdownAdapter = Utils.Decorate(Dropdown, AttachBody); + + var dropdown = new DropdownAdapter($select, new Options({ + dropdownParent: '#parent' + })); + + assert.equal( + dropdown.$dropdownParent[0], + $parent[0], + 'Should be parsed using the selector as a jQuery object' + ); +}); + +test('can be a jQuery object', function (assert) { + assert.expect(1); + + var $ = require('jquery'); + + var $select = $(''); + var $parent = $('
'); + + $('#qunit-fixture').append($parent); + + var Utils = require('select2/utils'); + var Options = require('select2/options'); + + var Dropdown = require('select2/dropdown'); + var AttachBody = require('select2/dropdown/attachBody'); + + var DropdownAdapter = Utils.Decorate(Dropdown, AttachBody); + + var dropdown = new DropdownAdapter($select, new Options({ + dropdownParent: $parent + })); + + assert.equal( + dropdown.$dropdownParent[0], + $parent[0], + 'Should just take the passed in jQuery object' + ); +}); + +test('defaults to the document body', function (assert) { + assert.expect(1); + + var $ = require('jquery'); + + var $select = $(''); + + var Utils = require('select2/utils'); + var Options = require('select2/options'); + + var Dropdown = require('select2/dropdown'); + var AttachBody = require('select2/dropdown/attachBody'); + + var DropdownAdapter = Utils.Decorate(Dropdown, AttachBody); + + var dropdown = new DropdownAdapter($select, new Options({})); + + assert.equal( + dropdown.$dropdownParent[0], + document.body, + 'Should default to wrapping document.body' + ); +});