mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 01:13:39 +00:00
test: reduce wording coupling and prune redundant coverage
This commit is contained in:
1 parent
80427af8cc
commit
1596d6a275
165 files changed
+633
-597
No files matched your search
@@ -249,7 +249,6 @@ it.skipIf(process.platform === "win32")(
|
||||
application_path: canonicalApplication,
|
||||
application_root: await realpath(readable),
|
||||
});
|
||||
expect(result.ok).toBe(true);
|
||||
if (!result.ok) throw result.error;
|
||||
expect(result.value.parameters).toEqual({
|
||||
...input,
|
||||
|
||||
@@ -188,7 +188,7 @@ it("retains completed target facts when cancellation arrives before Evidence pub
|
||||
isolation: "none",
|
||||
},
|
||||
limitations: expect.arrayContaining([
|
||||
"Browser host platform and architecture were not observed.",
|
||||
expect.stringMatching(/platform.*architecture.*not observed/iu),
|
||||
]),
|
||||
normalized_result: targets,
|
||||
});
|
||||
|
||||
@@ -140,9 +140,7 @@ describe("HTML base href empty segments", () => {
|
||||
it("keeps an above-root base escape when the reference also climbs", () => {
|
||||
expect(resolve("../app.js", "../../")).toMatchObject({
|
||||
resolution_status: "rejected",
|
||||
limitations: [
|
||||
"The resolved candidate escapes the canonical artifact root.",
|
||||
],
|
||||
limitations: [expect.stringMatching(/escapes.*artifact root/iu)],
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -160,9 +158,7 @@ describe("HTML base href path syntax", () => {
|
||||
it("still confines a base href that escapes the artifact root", () => {
|
||||
expect(resolve("app.js", "/a/../../secret/")).toMatchObject({
|
||||
resolution_status: "rejected",
|
||||
limitations: [
|
||||
"The resolved candidate escapes the canonical artifact root.",
|
||||
],
|
||||
limitations: [expect.stringMatching(/escapes.*artifact root/iu)],
|
||||
});
|
||||
});
|
||||
it("reports an external base href as external rather than malformed", () => {
|
||||
|
||||
@@ -36,8 +36,12 @@ it.each([
|
||||
|
||||
it("explains an unmodeled dynamic call result at the reached argument", () => {
|
||||
const result = trace('const url = wrap(base + "/x"); fetch(url);');
|
||||
expect(result.unknowns.map((unknown) => unknown.detail)).toContain(
|
||||
"The dynamic call's return dependency on this argument is unknown.",
|
||||
expect(result.unknowns).toContainEqual(
|
||||
expect.objectContaining({
|
||||
reason: "dynamic-call",
|
||||
family: "data-flow",
|
||||
relation_kinds: ["influences"],
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -48,20 +52,24 @@ it.each([
|
||||
])("keeps nested dynamic call return influence unknown: %s", (body) => {
|
||||
const result = trace(body);
|
||||
expect(result.status).not.toBe("found");
|
||||
expect(result.unknowns.map((unknown) => unknown.detail)).toContain(
|
||||
"The dynamic call's return dependency on this argument is unknown.",
|
||||
expect(result.unknowns).toContainEqual(
|
||||
expect.objectContaining({
|
||||
reason: "dynamic-call",
|
||||
family: "data-flow",
|
||||
relation_kinds: ["influences"],
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("does not report an unused dynamic call result as a missing value", () => {
|
||||
const result = trace('consume(base + "/x");');
|
||||
expect(
|
||||
result.unknowns.some(
|
||||
(unknown) =>
|
||||
unknown.detail ===
|
||||
"The dynamic call's return dependency on this argument is unknown.",
|
||||
),
|
||||
).toBe(false);
|
||||
expect(result.unknowns).not.toContainEqual(
|
||||
expect.objectContaining({
|
||||
reason: "dynamic-call",
|
||||
family: "data-flow",
|
||||
relation_kinds: ["influences"],
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("bounds operator production before graph admission and reports truncation", () => {
|
||||
|
||||
Reference in new issue
Block a user