refactor(web): extract shared runtime monster-artwork lookup
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
13
apps/web/src/app/shared/monster-artwork.spec.ts
Normal file
13
apps/web/src/app/shared/monster-artwork.spec.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { runtimeMonsterArtworkPath } from './monster-artwork';
|
||||
|
||||
describe('runtimeMonsterArtworkPath', () => {
|
||||
it('returns the optimized JPEG derivative for a known monster artwork path', () => {
|
||||
expect(runtimeMonsterArtworkPath('/images/monsters/ash-rat.png')).toBe(
|
||||
'/images/monsters/runtime/ash-rat-560.jpg',
|
||||
);
|
||||
});
|
||||
|
||||
it('returns undefined for an artwork path with no runtime derivative', () => {
|
||||
expect(runtimeMonsterArtworkPath('/images/enemies/Dawnwolf.png')).toBeUndefined();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user