style: format CHRNX navigation tests

This commit is contained in:
chrnx committed 2026-08-12 07:53:14 -05:00
1 parent 1f56277818
commit 01e7fa62bd
1 file changed
+4 -7
+4 -7
View File
@@ -43,19 +43,16 @@ function expectNoOverlap( boxes ) {
const a = boxes[ first ]; const a = boxes[ first ];
const b = boxes[ second ]; const b = boxes[ second ];
const overlaps = const overlaps =
a.x < b.x + b.width && a.x < b.x + b.width && a.x + a.width > b.x && a.y < b.y + b.height && a.y + a.height > b.y;
a.x + a.width > b.x &&
a.y < b.y + b.height &&
a.y + a.height > b.y;
expect( overlaps ).toBe( false ); expect( overlaps ).toBe( false );
} }
} }
} }
async function expectNoHorizontalOverflow( page, header ) { async function expectNoHorizontalOverflow( page, header ) {
expect( expect( await header.evaluate( ( element ) => element.scrollWidth <= element.clientWidth ) ).toBe(
await header.evaluate( ( element ) => element.scrollWidth <= element.clientWidth ), true,
).toBe( true ); );
expect( expect(
await page.evaluate( await page.evaluate(
() => document.documentElement.scrollWidth <= document.documentElement.clientWidth, () => document.documentElement.scrollWidth <= document.documentElement.clientWidth,