Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Sep 10, 2023
1 parent 1610882 commit 5352841
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/shapes/ActiveSelection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ describe('ActiveSelection', () => {
expect(selection.item(0).getCenterPoint()).toEqual({ x: 50, y: 50 });
});

// remove todo once #9152 is merged
it.todo('should not set coords in the constructor', () => {
const spy = jest.spyOn(ActiveSelection.prototype, 'setCoords');
spy.mockImplementation(() => console.trace());
new ActiveSelection([
new FabricObject({
left: 100,
top: 100,
width: 100,
height: 100,
}),
]);
expect(spy).not.toHaveBeenCalled();
});

it('sets coords after attaching to canvas', () => {
const canvas = new Canvas(null, {
activeSelection: new ActiveSelection([
Expand Down

0 comments on commit 5352841

Please sign in to comment.