From 10d24d2ca2a4b7d780b2359316c3d77f502fce7b Mon Sep 17 00:00:00 2001 From: glmdgrielson Date: Tue, 5 Nov 2024 12:10:34 -0500 Subject: [PATCH] Move test to better category Whoops, should have read the whole file. --- .../character/CharacterFactory.test.tsx | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/lib/domains/character/CharacterFactory.test.tsx b/lib/domains/character/CharacterFactory.test.tsx index 35189ce4..698a7164 100644 --- a/lib/domains/character/CharacterFactory.test.tsx +++ b/lib/domains/character/CharacterFactory.test.tsx @@ -650,29 +650,6 @@ describe("CharacterFactory.migrate", () => { version: 6, }); }); - - it("should handle DuplicateIds", () => { - const result = CharacterFactory.makeFromJson(DuplicateIds); - - const ids = [result.id]; - - for (const page of result.pages) { - ids.push(page.id); - for (const row of page.rows) { - for (const column of row.columns) { - for (const section of column.sections) { - ids.push(section.id); - for (const block of section.blocks) { - ids.push(block.id); - } - } - } - } - } - - // This should check for duplicates - expect(new Set(ids).size).toEqual(ids.length); - }); }); }); @@ -715,4 +692,27 @@ describe("CharacterFactory.duplicate", () => { }); }); }); + + it("should handle duplicate id imports", () => { + const result = CharacterFactory.makeFromJson(DuplicateIds); + + const ids = [result.id]; + + for (const page of result.pages) { + ids.push(page.id); + for (const row of page.rows) { + for (const column of row.columns) { + for (const section of column.sections) { + ids.push(section.id); + for (const block of section.blocks) { + ids.push(block.id); + } + } + } + } + } + + // This should check for duplicates + expect(new Set(ids).size).toEqual(ids.length); + }); });