fix(housekeeping): preserve banner server actions
This commit is contained in:
@@ -344,4 +344,12 @@ describe("Content legacy wrappers", () => {
|
||||
expect(source).toContain('from "@/actions/admin-banners"');
|
||||
expect(source).not.toContain('from "@/actions/banners"');
|
||||
});
|
||||
|
||||
it("exports explicit async banner wrappers accepted by Next server actions", () => {
|
||||
const source = readFileSync("src/actions/admin-banners.ts", "utf8");
|
||||
expect(source).not.toMatch(/export\s*\{/u);
|
||||
for (const action of ["createBanner", "updateBanner", "deleteBanner"]) {
|
||||
expect(source).toContain(`export async function ${action}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user