Created
October 19, 2015 14:52
-
-
Save just-boris/178f3ab863c7a9971708 to your computer and use it in GitHub Desktop.
JSUnderhood
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('tests', function() { | |
function createElement(html, options) { | |
var wrapper = $('<div></div>'); | |
$(html || "<select></select>").appendTo(wrapper).selectize(options || {}); | |
return wrapper; | |
} | |
beforeEach(function () { | |
var $element = createElement('<select>' + | |
'<option value="1">Foo</option>' + | |
'<option value="2">Bar</option>' + | |
'</select>'); | |
}); | |
it("should initialize element", function () { | |
expect($element.find('select')).toHaveClass('selectized'); | |
expect($selement.find('.selectize-input')).toExist(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment