Skip to content

Commit cf7607e

Browse files
author
Timon Krebs
committed
feat(cdk/drag-drop): fixed tests
1 parent 5164406 commit cf7607e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/cdk/drag-drop/directives/drag.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ describe('CdkDrag', () => {
376376
// go into an infinite loop trying to stringify the event, if the test fails.
377377
expect(event).toEqual({
378378
source: fixture.componentInstance.dragInstance,
379-
distance: {x: jasmine.any(Number), y: jasmine.any(Number)}
379+
distance: {x: jasmine.any(Number), y: jasmine.any(Number)},
380+
dropPosition: {x: jasmine.any(Number), y: jasmine.any(Number)}
380381
});
381382
}));
382383

@@ -389,15 +390,17 @@ describe('CdkDrag', () => {
389390

390391
expect(event).toEqual({
391392
source: jasmine.anything(),
392-
distance: {x: 25, y: 30}
393+
distance: {x: 25, y: 30},
394+
dropPosition: {x: 25, y: 30}
393395
});
394396

395397
dragElementViaMouse(fixture, fixture.componentInstance.dragElement.nativeElement, 40, 50);
396398
event = fixture.componentInstance.endedSpy.calls.mostRecent().args[0];
397399

398400
expect(event).toEqual({
399401
source: jasmine.anything(),
400-
distance: {x: 40, y: 50}
402+
distance: {x: 40, y: 50},
403+
dropPosition: {x: 40, y: 50}
401404
});
402405
}));
403406

0 commit comments

Comments
 (0)