Files
openclaw/test/scripts/check-extension-wildcard-reexports.test.ts
Peter Steinberger c70aee247e refactor(scripts): migrate JavaScript tools to TypeScript (#121005)
* refactor(scripts): migrate JavaScript tools to TypeScript

* fix(ci): keep changed-scope preflight zero-install

* fix(ci): preserve zero-install script owners

* fix(ci): complete script migration follow-through

* fix(release): keep stable closeout zero-install

* fix(scripts): preserve standalone execution boundaries

* fix(scripts): repair standalone loader boundaries

* fix(scripts): normalize gateway observation ids

* fix(scripts): keep Docker packager standalone

* test(scripts): preserve rebase cleanup helpers

* test(sessions): use tracked temp directory
2026-08-09 07:21:35 -07:00

33 lines
1.1 KiB
TypeScript

// Check Extension Wildcard Reexports tests cover check extension wildcard reexports script behavior.
import { describe, expect, it } from "vitest";
import { findLocalWildcardReexports } from "../../scripts/check-extension-wildcard-reexports.mts";
describe("check-extension-wildcard-reexports", () => {
it("flags local wildcard re-exports", () => {
expect(
findLocalWildcardReexports(
[
'export * from "./src/runtime-api.js";',
'export type * from "../api.js";',
'export { named } from "./src/runtime-api.js";',
].join("\n"),
),
).toEqual([
{ line: 1, text: 'export * from "./src/runtime-api.js";' },
{ line: 2, text: 'export type * from "../api.js";' },
]);
});
it("allows explicit local exports and external wildcard barrels", () => {
expect(
findLocalWildcardReexports(
[
'export { named } from "./src/runtime-api.js";',
'export type { Named } from "../api.js";',
'export * from "external-package";',
].join("\n"),
),
).toStrictEqual([]);
});
});