feat: add ico MIME type and heif->heic extension alias

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-31 10:08:46 +02:00
co-authored by Claude Sonnet 5
parent 2b2d8a9e6f
commit 39b296f5d3
2 changed files with 24 additions and 1 deletions
+20
View File
@@ -28,6 +28,12 @@ describe('outputMimeType', () => {
});
});
describe('outputMimeType — ico', () => {
it('returns image/x-icon for ico', () => {
expect(outputMimeType('ico')).toBe('image/x-icon');
});
});
describe('resolveInputFormat', () => {
it('accepts a PNG file declared as png', async () => {
const fixturePath = path.join(import.meta.dirname, 'fixtures', 'sample.png');
@@ -84,3 +90,17 @@ describe('resolveInputFormat', () => {
await fs.unlink(fixturePath);
});
});
describe('resolveInputFormat — heic/heif alias', () => {
it('accepts a HEIC-family file declared as heic', async () => {
const fixturePath = path.join(import.meta.dirname, 'fixtures', 'sample.heic');
const result = await resolveInputFormat(fixturePath, 'heic');
expect(result.valid).toBe(true);
});
it('accepts the same HEIC-family content declared as heif', async () => {
const fixturePath = path.join(import.meta.dirname, 'fixtures', 'sample.heif');
const result = await resolveInputFormat(fixturePath, 'heif');
expect(result.valid).toBe(true);
});
});