mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
### 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?
32 lines
857 B
TypeScript
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`);
|
|
},
|
|
});
|
|
});
|