前端js组件更新

This commit is contained in:
2019-09-01 22:53:06 +08:00
parent 0235d72e44
commit 075c1036eb
6939 changed files with 686103 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
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));
});