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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user