File tree Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -255,11 +255,30 @@ test( "offsets", function() {
255
255
} ) ;
256
256
257
257
test ( "using" , function ( ) {
258
- expect ( 6 ) ;
258
+ expect ( 10 ) ;
259
259
260
260
var count = 0 ,
261
261
elems = $ ( "#el1, #el2" ) ,
262
- expectedPosition = { top : 40 , left : 40 } ,
262
+ of = $ ( "#parentx" ) ,
263
+ expectedPosition = { top : 60 , left : 60 } ,
264
+ expectedFeedback = {
265
+ target : {
266
+ element : of ,
267
+ width : 20 ,
268
+ height : 20 ,
269
+ left : 40 ,
270
+ top : 40
271
+ } ,
272
+ element : {
273
+ width : 6 ,
274
+ height : 6 ,
275
+ left : 60 ,
276
+ top : 60
277
+ } ,
278
+ horizontal : "left" ,
279
+ vertical : "top" ,
280
+ important : "vertical"
281
+ } ,
263
282
originalPosition = elems . position ( {
264
283
my : "right bottom" ,
265
284
at : "rigt bottom" ,
@@ -269,11 +288,14 @@ test( "using", function() {
269
288
270
289
elems . position ( {
271
290
my : "left top" ,
272
- at : "left top " ,
291
+ at : "center+10 bottom " ,
273
292
of : "#parentx" ,
274
- using : function ( position ) {
293
+ using : function ( position , feedback ) {
275
294
deepEqual ( this , elems [ count ] , "correct context for call #" + count ) ;
276
295
deepEqual ( position , expectedPosition , "correct position for call #" + count ) ;
296
+ deepEqual ( feedback . element . element [ 0 ] , elems [ count ] ) ;
297
+ delete feedback . element . element ;
298
+ deepEqual ( feedback , expectedFeedback ) ;
277
299
count ++ ;
278
300
}
279
301
} ) ;
You can’t perform that action at this time.
0 commit comments