diff --git a/tests/assets.test.mjs b/tests/assets.test.mjs index 2292829..6c16eba 100644 --- a/tests/assets.test.mjs +++ b/tests/assets.test.mjs @@ -93,12 +93,16 @@ const webpDimensions = (name, dataUrl) => { assert.fail(`${name} must expose VP8X dimensions`); }; -for (const [name, dataUrl] of Object.entries({ playerHealth, enemyHealth })) { - test(`${name} health sheet stays high resolution`, () => { - const { width, height } = webpDimensions(name, dataUrl); - assert.ok(width >= 1200, `${name} width must stay >= 1200px, got ${width}px`); - assert.ok(height >= 300, `${name} height must stay >= 300px, got ${height}px`); - assert.ok(width / 4 >= 300, `${name} frame width must stay >= 300px`); - assert.ok(height / 3 >= 100, `${name} frame height must stay >= 100px`); - }); -} +test('playerHealth native frame stays high resolution', () => { + const { width, height } = webpDimensions('playerHealth', playerHealth); + assert.ok(width >= 300, `playerHealth width must stay >= 300px, got ${width}px`); + assert.ok(height >= 100, `playerHealth height must stay >= 100px, got ${height}px`); +}); + +test('enemyHealth health sheet stays high resolution', () => { + const { width, height } = webpDimensions('enemyHealth', enemyHealth); + assert.ok(width >= 1200, `enemyHealth width must stay >= 1200px, got ${width}px`); + assert.ok(height >= 300, `enemyHealth height must stay >= 300px, got ${height}px`); + assert.ok(width / 4 >= 300, 'enemyHealth frame width must stay >= 300px'); + assert.ok(height / 3 >= 100, 'enemyHealth frame height must stay >= 100px'); +});