Skip to content

Commit 645ced5

Browse files
Address review feedback
1 parent 004aa65 commit 645ced5

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

plugins/auto-sizes/tests/e2e/specs/improve-calculate-sizes.spec.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,11 @@ test.describe( 'check accurate sizes', () => {
6969
const updatedImageSizes =
7070
await updatedImageElement.getAttribute( 'sizes' );
7171

72-
if ( imageSizes === updatedImageSizes ) {
73-
throw new Error(
74-
'Image sizes did not update after activating the plugin.'
75-
);
76-
}
72+
expect( imageSizes ).not.toStrictEqual( updatedImageSizes );
7773

78-
if ( '(max-width: 620px) 100vw, 620px' !== updatedImageSizes ) {
79-
throw new Error(
80-
`Unexpected image sizes: ${ updatedImageSizes }. Expected: (max-width: 620px) 100vw, 620px`
81-
);
82-
}
74+
expect( updatedImageSizes ).toStrictEqual(
75+
'(max-width: 620px) 100vw, 620px'
76+
);
8377

8478
const currentSrc = await updatedImageElement.evaluate( ( img ) =>
8579
img instanceof HTMLImageElement ? img.currentSrc : null

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
},
1111
"include": [
1212
"plugins/**/*.js",
13-
"plugins/**/*.ts", "tools/**/*.ts",
13+
"plugins/**/*.ts",
14+
"tools/**/*.ts",
1415
],
1516
"exclude": [
1617
"plugins/*/build/*"

0 commit comments

Comments
 (0)