diff --git a/src/domain/desktop/appTaskDraftNoise.test.ts b/src/domain/desktop/appTaskDraftNoise.test.ts index 5157340402..eb43723223 100644 --- a/src/domain/desktop/appTaskDraftNoise.test.ts +++ b/src/domain/desktop/appTaskDraftNoise.test.ts @@ -1,7 +1,6 @@ import { describe, expect, it } from "vitest"; import type { JsonValue } from "../jsonValue.js"; -import { evaluateTaskChecks } from "./appTaskChecks.js"; import { draftOf, passing, @@ -816,18 +815,8 @@ it("keeps an added ID-only member when another XML archive entry independently a const checks = (drafted?.suggested ?? []).filter( (check) => "pointer" in check && check.pointer.includes("[name=other.xml]"), ); - expect( - evaluateTaskChecks( - checks.map((check, index) => ({ ...check, id: `c${index}` })), - new Map([[file, { format: "zip", view: archive(false) }]]), - ).map(({ passed }) => passed), - ).toContain(false); - expect( - evaluateTaskChecks( - checks.map((check, index) => ({ ...check, id: `c${index}` })), - new Map([[file, { format: "zip", view: archive(true) }]]), - ).every(({ passed }) => passed), - ).toBe(true); + expect(passing(file, archive(false), checks, "zip")).toContain(false); + expect(passing(file, archive(true), checks, "zip").every(Boolean)).toBe(true); }); it("keeps changed display text when its matching label belongs to another XML archive entry", () => { @@ -870,16 +859,8 @@ it("keeps changed display text when its matching label belongs to another XML ar (check) => "pointer" in check && check.pointer.includes("[name=display.xml]"), ); - expect( - evaluateTaskChecks( - checks.map((check, index) => ({ ...check, id: `c${index}` })), - new Map([[file, { format: "zip", view: archive("Old") }]]), - ).map(({ passed }) => passed), - ).toContain(false); - expect( - evaluateTaskChecks( - checks.map((check, index) => ({ ...check, id: `c${index}` })), - new Map([[file, { format: "zip", view: archive("New") }]]), - ).every(({ passed }) => passed), - ).toBe(true); + expect(passing(file, archive("Old"), checks, "zip")).toContain(false); + expect(passing(file, archive("New"), checks, "zip").every(Boolean)).toBe( + true, + ); });