mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-05-27 07:36:18 +00:00
Adjust load_data test to accommodate test.ged file length on Windows (#234)
This commit is contained in:
@@ -10,7 +10,9 @@ describe('loadFile', () => {
|
|||||||
const file = readFileSync('src/datasource/testdata/test.ged');
|
const file = readFileSync('src/datasource/testdata/test.ged');
|
||||||
const blob = new Blob([file]) as globalThis.Blob;
|
const blob = new Blob([file]) as globalThis.Blob;
|
||||||
const {gedcom, images} = await loadFile(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());
|
expect(images).toEqual(new Map());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user