Skip to content

Commit a52877f

Browse files
committed
nobody was using the event to onDone
and they shouldn't - it's the mouseDown and mouseMove events that actually matter to the action. So update the test to reflect that.
1 parent d7dc1c5 commit a52877f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/jasmine/tests/dragelement_test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('dragElement', function() {
8181
expect(args[1]).toEqual(10);
8282
});
8383

84-
it('should pass the event to doneFn on mouseup after mousemove', function() {
84+
it('does not pass the event to doneFn on mouseup after mousemove', function() {
8585
var args = [];
8686
var options = {
8787
element: this.element,
@@ -99,8 +99,7 @@ describe('dragElement', function() {
9999
mouseEvent('mousemove', this.x + 10, this.y + 10);
100100
mouseEvent('mouseup', this.x, this.y);
101101

102-
expect(args.length).toBe(1);
103-
expect(args[0].type).toBe('mouseup');
102+
expect(args.length).toBe(0);
104103
});
105104

106105
it('should pass numClicks and event to clickFn on mouseup after no/small mousemove', function() {

0 commit comments

Comments
 (0)