Skip to content

Commit

Permalink
run tests on a virtual high resolution screen
Browse files Browse the repository at this point in the history
  • Loading branch information
TremayneChrist committed Jan 23, 2019
1 parent de41717 commit dbb81d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/resize-observer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ describe('ResizeObserver', () => {
let el1: HTMLElement;
let el2: HTMLElement;
let svg1: SVGGraphicsElement;

// Set dpr to be high resolution
(window as any).devicePixelRatio = 5;

beforeEach(() => {
el1 = document.createElement('div');
Expand Down Expand Up @@ -365,8 +368,8 @@ describe('ResizeObserver', () => {
blockSize: 120
});
expect(entries[0].devicePixelBorderBoxSize).toMatchObject({
inlineSize: 330 * devicePixelRatio,
blockSize: 130 * devicePixelRatio
inlineSize: 330 * 5,
blockSize: 130 * 5
});
done();
});
Expand Down

0 comments on commit dbb81d3

Please sign in to comment.