Skip to content

Commit 92f723e

Browse files
authored
Adjust load_data test to accommodate test.ged file length on Windows (#234)
1 parent 2458c51 commit 92f723e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/datasource/load_data.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ describe('loadFile', () => {
1010
const file = readFileSync('src/datasource/testdata/test.ged');
1111
const blob = new Blob([file]) as globalThis.Blob;
1212
const {gedcom, images} = await loadFile(blob);
13-
expect(gedcom.length).toBe(4408);
13+
// File length may differ between Linux and Windows due to line endings (\n vs \r\n)
14+
// So, check for a set of values instead of exactly one value
15+
expect([4408, 4765]).toContain(gedcom.length);
1416
expect(images).toEqual(new Map());
1517
});
1618

0 commit comments

Comments
 (0)