test(app): tighten weak assertions in utils tests (#714)

Replace toBeDefined/toBeTruthy guards with concrete shape assertions
using toContainEqual(expect.objectContaining(...)) in diff-highlighter
tests, and toMatch(/^script-draft-\d+$/) for the ID check in
project-config-form tests.
This commit is contained in:
Mohamed Boudra
2026-05-05 19:58:55 +07:00
parent 6bd5d4c410
commit 0a84c613f7
2 changed files with 43 additions and 45 deletions
@@ -49,7 +49,7 @@ describe("configToDraft", () => {
expect(devRow.commandOriginalKind).toBe("string");
expect(devRow.type).toBe("long-running");
expect(devRow.portText).toBe("3000");
expect(devRow.id).toBeTruthy();
expect(devRow.id).toMatch(/^script-draft-\d+$/);
expect(buildRow.name).toBe("build");
expect(buildRow.commandText).toBe("npm\nrun\nbuild");
expect(buildRow.commandOriginalKind).toBe("array");