Adjust load_data test to accommodate test.ged file length on Windows (#234)

This commit is contained in:
Adam Gross 2025-12-30 01:20:33 -08:00 committed by GitHub
parent 2458c51dbd
commit 92f723e7fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,9 @@ describe('loadFile', () => {
const file = readFileSync('src/datasource/testdata/test.ged');
const blob = new Blob([file]) as globalThis.Blob;
const {gedcom, images} = await loadFile(blob);
expect(gedcom.length).toBe(4408);
// File length may differ between Linux and Windows due to line endings (\n vs \r\n)
// So, check for a set of values instead of exactly one value
expect([4408, 4765]).toContain(gedcom.length);
expect(images).toEqual(new Map());
});