mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 03:02:55 +00:00
* chore(lint): reduce underscore-dangle exceptions * chore(lint): reduce more underscore exceptions * chore(lint): remove underscore-dangle allow list * fix(lint): repair underscore cleanup regressions * test(lint): track version define suppression
17 lines
674 B
TypeScript
17 lines
674 B
TypeScript
import path from "node:path";
|
|
import { pathToFileURL } from "node:url";
|
|
import { describe, expect, it } from "vitest";
|
|
import { testing } from "./startup-metadata.js";
|
|
|
|
describe("startup metadata path resolution", () => {
|
|
it("checks metadata beside the bundled chunk before the legacy parent path", () => {
|
|
const moduleDir = path.resolve("dist");
|
|
const moduleUrl = pathToFileURL(path.join(moduleDir, "root-help-metadata-abc123.js")).href;
|
|
|
|
expect(testing.resolveStartupMetadataPathCandidates(moduleUrl)).toEqual([
|
|
path.join(moduleDir, "cli-startup-metadata.json"),
|
|
path.join(path.dirname(moduleDir), "cli-startup-metadata.json"),
|
|
]);
|
|
});
|
|
});
|