mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 13:12:26 +00:00
fix(ci): restore formatting for JavaScript tests (#11951)
This commit is contained in:
1 parent
a85f228198
commit
2b26bd107e
7 files changed
+35
-25
No files matched your search
@@ -80,15 +80,12 @@ describe("HTML base href dot segments", () => {
|
||||
["a/.", "renderer/a/app.js"],
|
||||
["a/..", "renderer/app.js"],
|
||||
["..", "app.js"],
|
||||
])(
|
||||
"resolves %s against the document directory",
|
||||
(base, expected) => {
|
||||
expect(resolve("app.js", base)).toMatchObject({
|
||||
resolution_status: "resolved",
|
||||
resolved_path: expected,
|
||||
});
|
||||
},
|
||||
);
|
||||
])("resolves %s against the document directory", (base, expected) => {
|
||||
expect(resolve("app.js", base)).toMatchObject({
|
||||
resolution_status: "resolved",
|
||||
resolved_path: expected,
|
||||
});
|
||||
});
|
||||
it.each([
|
||||
["app.js/", "/assets/", "assets/app.js"],
|
||||
["app.js/.", "/assets/", "assets/app.js"],
|
||||
@@ -154,16 +151,13 @@ describe("HTML reference URL text", () => {
|
||||
["app.js", "%61/", "renderer/a/app.js"],
|
||||
["app.js", " /%61ssets/ ", "assets/app.js"],
|
||||
["/%61ssets/app.js", "", "assets/app.js"],
|
||||
])(
|
||||
"resolves %j against base %j",
|
||||
(declared, base, expected) => {
|
||||
expect(resolve(declared, base)).toMatchObject({
|
||||
declared_path: declared,
|
||||
resolution_status: "resolved",
|
||||
resolved_path: expected,
|
||||
});
|
||||
},
|
||||
);
|
||||
])("resolves %j against base %j", (declared, base, expected) => {
|
||||
expect(resolve(declared, base)).toMatchObject({
|
||||
declared_path: declared,
|
||||
resolution_status: "resolved",
|
||||
resolved_path: expected,
|
||||
});
|
||||
});
|
||||
it("keeps a literal percent sign that starts no escape", () => {
|
||||
expect(resolve("100%.js", "")).toMatchObject({
|
||||
resolution_status: "not-found",
|
||||
|
||||
@@ -70,7 +70,10 @@ it("retains only declared package metadata despite inherited host fields", () =>
|
||||
}
|
||||
expect(absentMain).toBeUndefined();
|
||||
expect(undeclaredModule).toBeUndefined();
|
||||
expect(absent).toMatchObject({ status: "included", nextDependency: "unproven" });
|
||||
expect(absent).toMatchObject({
|
||||
status: "included",
|
||||
nextDependency: "unproven",
|
||||
});
|
||||
expect(declared).toMatchObject({
|
||||
status: "included",
|
||||
nextDependency: "declared",
|
||||
|
||||
@@ -410,7 +410,11 @@ it("anchors based and unbased constants while preserving original paths and depl
|
||||
expect(result.sources).toMatchObject(
|
||||
[plannerUrl, reportsUrl].map((url) => ({
|
||||
url,
|
||||
base_path: { value: "/app", basis: "next-script-url", status: "inferred" },
|
||||
base_path: {
|
||||
value: "/app",
|
||||
basis: "next-script-url",
|
||||
status: "inferred",
|
||||
},
|
||||
})),
|
||||
);
|
||||
const [planner, reports] = result.sources;
|
||||
|
||||
@@ -69,7 +69,8 @@ cliTest.for(["CLI", "stdio MCP"] as const)(
|
||||
});
|
||||
expect(
|
||||
inventory?.sources.find(
|
||||
({ key }) => key === "node_modules/ordinary/app/dependency-only/page.js",
|
||||
({ key }) =>
|
||||
key === "node_modules/ordinary/app/dependency-only/page.js",
|
||||
)?.next_app_context,
|
||||
).toMatchObject({
|
||||
kind: "unknown",
|
||||
|
||||
@@ -94,7 +94,10 @@ cliTest.for(["CLI", "stdio MCP"] as const)(
|
||||
);
|
||||
const runtime = inventory?.sources.find(({ key }) => key === "runtime.js");
|
||||
for (const [anchor, descendant] of patterns) {
|
||||
expect(routes.find(({ path }) => path === anchor), anchor).toMatchObject({
|
||||
expect(
|
||||
routes.find(({ path }) => path === anchor),
|
||||
anchor,
|
||||
).toMatchObject({
|
||||
occurrence_count: 2,
|
||||
source_count: 2,
|
||||
});
|
||||
|
||||
@@ -237,7 +237,9 @@ cliTest.for(["CLI", "stdio MCP"] as const)(
|
||||
}),
|
||||
evidence: expect.objectContaining({
|
||||
limitations: expect.arrayContaining([
|
||||
expect.stringContaining("does not define package import alias #missing"),
|
||||
expect.stringContaining(
|
||||
"does not define package import alias #missing",
|
||||
),
|
||||
expect.stringContaining("#config"),
|
||||
]),
|
||||
}),
|
||||
|
||||
@@ -100,7 +100,10 @@ it("preserves external and inline HTML script ranges across line endings", async
|
||||
expect(records).toHaveLength(documents.length);
|
||||
|
||||
for (const { source, html, start, end } of documents) {
|
||||
const missingStart = { line: end.line, column: end.column + closing.length };
|
||||
const missingStart = {
|
||||
line: end.line,
|
||||
column: end.column + closing.length,
|
||||
};
|
||||
const missingEnd = {
|
||||
line: end.line,
|
||||
column: missingStart.column + missingOpening.length,
|
||||
|
||||
Reference in new issue
Block a user