Closed aboqasem closed 1 month ago
Thanks for the reproduction
The issue is that there is no loader for .astro
files configured for Bun. It only is configured for Vitest. We don't have the engineering resources to implement Vitest plugin support in Bun - you can ask Astro if they want to do an equivalent of their Vitest plugin for bun test. It's probably very similar.
What version of Bun is running?
1.1.27+267afa293
What platform is your computer?
Darwin 23.6.0 x86_64 i38 OR Linux 6.1.43 x86_64 unknown
What steps can reproduce the bug?
const runner = typeof Bun === "undefined" ? "Node" : "Bun";
test(
Running with ${runner}
, async () => { const container = await AstroContainer.create(); const result = await container.renderToString(Index);expect(result).toContain("Bun Test?"); });
What is the expected behavior?
bun test
to work at least when importingbun:test
.What do you see instead?
See above.
Additional information
Codesandbox: https://codesandbox.io/p/devbox/bun-test-astro-container-bug-g4hgsp?file=%2Fsrc%2Fpages%2Findex.test.ts