From f6367e29e7a5250123ca78a9dfbb568643d833bf Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 28 Dec 2025 15:24:30 -0500 Subject: [PATCH] Fix Nikon test --- __tests__/nikon.test.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/__tests__/nikon.test.ts b/__tests__/nikon.test.ts index 09265c33..f21d5c9a 100644 --- a/__tests__/nikon.test.ts +++ b/__tests__/nikon.test.ts @@ -1,4 +1,6 @@ -import { getNikonPictureControlFromMakerNote } from '@/platforms/nikon/simulation'; +import { + getNikonPictureControlFromMakerNote, +} from '@/platforms/nikon/simulation'; describe('Nikon', () => { describe('parsing', () => { @@ -9,7 +11,9 @@ describe('Nikon', () => { // TIFF Header at offset 10 // II (Little Endian) - const tiffHeader = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00]); + const tiffHeader = Buffer.from( + [0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00], + ); // IFD at offset 10 + 8 = 18 // Count: 1 tag @@ -33,12 +37,18 @@ describe('Nikon', () => { const data = Buffer.alloc(108); data.write('0310', 0); data.write('0310', 4); - data.write('Standard\0\0\0', 8); // Name at offset 8 + data.write('standard\0\0\0', 8); // Name at offset 8 - const makerNote = Buffer.concat([header, tiffHeader, ifdCount, tag, data]); + const makerNote = Buffer.concat([ + header, + tiffHeader, + ifdCount, + tag, + data, + ]); const pictureControl = getNikonPictureControlFromMakerNote(makerNote); - expect(pictureControl).toBe('Standard'); + expect(pictureControl).toBe('standard'); }); it('returns undefined for invalid header', () => {