short-url/public/vendor/bootstrap-datepicker/tests/suites/methods_jquery.js
Supan Adit Pratama b2e434483d first commit
2020-07-01 15:57:45 +07:00

27 lines
697 B
JavaScript
Executable File
Vendored

module('Methods (jQuery)', {
setup: function(){
this.$inputs = $('<input><input>')
.datepicker()
.appendTo('#qunit-fixture');
},
teardown: function(){
this.$inputs.each(function(){
$.data(this, 'datepicker').picker.remove();
});
}
});
test('Methods', function(){
[
'show',
'hide',
'setValue',
'place'
].forEach($.proxy(function(index, value){
var returnedObject = this.$inputs.datepicker(value);
strictEqual(returnedObject, this.$inputs, "is jQuery element");
strictEqual(returnedObject.length, 2, "correct length of jQuery elements");
}, this));
});