import assert from "assert"; import { itBundled, testForFile } from "../expectBundled"; var { describe, test, expect } = testForFile(import.meta.path); // Tests ported from: // https://github.com/evanw/esbuild // most of these are from scripts/end-to-end-tests.js but some are from other files // For debug, all files are written to $TEMP/bun-bundle-tests/extra describe("bundler", () => { itBundled("extra/FileAsDirectoryBreak", { files: { "/index.js": ` import foo from "./file.js/what/is/this"; `, "/file.js": ` export default 123; `, }, bundleErrors: { "/index.js": [`Could not resolve: "./file.js/what/is/this"`], }, }); itBundled("extra/PathWithQuestionMark", { todo: true, files: { "/index.js": ` import foo from "./file.js?ignore-me"; console.log(foo); `, "/file.js": ` export default 123; `, }, run: { stdout: "123", }, }); itBundled("extra/JSXEscaping1", { files: { "/index.js": ` let button =