Skip to content

Commit

Permalink
chore: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
btea committed Apr 26, 2024
1 parent f2f3c83 commit 4bb7f66
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/happy-dom/test/nodes/element/Element.test.ts
Expand Up @@ -1572,6 +1572,16 @@ describe('Element', () => {
expect(domRect.right).toBe(4);
expect(domRect.bottom).toBe(6);
expect(domRect.left).toBe(1);

const newDomRect = DOMRect.fromRect({ x: 1 });
expect(newDomRect.x).toBe(1);
expect(newDomRect.y).toBe(0);
expect(newDomRect.width).toBe(0);
expect(newDomRect.height).toBe(0);
expect(newDomRect.top).toBe(0);
expect(newDomRect.right).toBe(1);
expect(newDomRect.bottom).toBe(0);
expect(newDomRect.left).toBe(1);
});
});

Expand Down

0 comments on commit 4bb7f66

Please sign in to comment.