Files
bun.sh/test/bundler/bundler_footer.test.ts
Jarred Sumner 9411c62756 Make the bundler tests use the API by default in most cases (#22646)
### What does this PR do?

This branch:
> Ran 1600 tests across 46 files. [63.24s]

Main:
> Ran 1600 tests across 46 files. [137.05s]

This makes the bundler tests run about 60 seconds faster 

### How did you verify your code works?
2025-09-14 02:27:53 -07:00

32 lines
857 B
TypeScript

import { describe } from "bun:test";
import { itBundled } from "./expectBundled";
describe("bundler", () => {
itBundled("footer/CommentFooter", {
footer: "// developed with love in SF",
backend: "cli",
files: {
"/a.js": `console.log("Hello, world!")`,
},
onAfterBundle(api) {
api.expectFile("out.js").toEndWith('// developed with love in SF"\n');
},
});
itBundled("footer/MultilineFooter", {
footer: `/**
* This is copyright of [...] ${new Date().getFullYear()}
* do not redistribute without consent of [...]
*/`,
backend: "cli",
files: {
"index.js": `console.log("Hello, world!")`,
},
onAfterBundle(api) {
api.expectFile("out.js").toEndWith(`/**
* This is copyright of [...] ${new Date().getFullYear()}
* do not redistribute without consent of [...]
*/\"\n`);
},
});
});