fix: promote approved Gaming character art
This commit is contained in:
13 files changed
+153
-13
No files matched your search
@@ -181,8 +181,13 @@ test( 'all approved portraits rebuild byte-identically within payload bounds', (
|
||||
assert.deepEqual( readdirSync( external ), [ 'sentinel' ] );
|
||||
execFileSync( './scripts/build-responsive-images.sh', [ output ], { cwd: new URL( '../..', import.meta.url ) } );
|
||||
const names = readdirSync( output ).sort();
|
||||
assert.equal( names.length, 40 );
|
||||
assert.equal( names.length, 45 );
|
||||
for ( const name of [
|
||||
'alter-ego-gaming-half-body-384.avif',
|
||||
'alter-ego-gaming-half-body-384.webp',
|
||||
'alter-ego-gaming-half-body-768.avif',
|
||||
'alter-ego-gaming-half-body-768.webp',
|
||||
'alter-ego-gaming-half-body.json',
|
||||
'the-no-names-collage-384.avif',
|
||||
'the-no-names-collage-384.webp',
|
||||
'the-no-names-collage-768.avif',
|
||||
@@ -193,6 +198,7 @@ test( 'all approved portraits rebuild byte-identically within payload bounds', (
|
||||
}
|
||||
let total = 0;
|
||||
let collageTotal = 0;
|
||||
let gamingHalfBodyTotal = 0;
|
||||
for ( const name of names ) {
|
||||
const generated = readFileSync( join( output, name ) );
|
||||
const committed = readFileSync( new URL( `../../assets/images/generated/${ name }`, import.meta.url ) );
|
||||
@@ -213,10 +219,17 @@ test( 'all approved portraits rebuild byte-identically within payload bounds', (
|
||||
if ( name.startsWith( 'the-no-names-collage-' ) ) {
|
||||
collageTotal += generated.length;
|
||||
}
|
||||
if ( name.startsWith( 'alter-ego-gaming-half-body-' ) ) {
|
||||
gamingHalfBodyTotal += generated.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
assert.ok( collageTotal <= 400 * 1024, `collage derivatives exceed 400 KiB: ${ collageTotal }` );
|
||||
assert.ok( total <= 2.1 * 1024 * 1024, `derivatives exceed 2.1 MiB: ${ total }` );
|
||||
assert.ok(
|
||||
gamingHalfBodyTotal <= 340 * 1024,
|
||||
`gaming half-body derivatives exceed 340 KiB: ${ gamingHalfBodyTotal }`,
|
||||
);
|
||||
assert.ok( total <= 2.4 * 1024 * 1024, `derivatives exceed 2.4 MiB: ${ total }` );
|
||||
} finally {
|
||||
rmSync( output, { recursive: true, force: true } );
|
||||
rmSync( external, { recursive: true, force: true } );
|
||||
|
||||
Reference in new issue
Block a user