Testcontainers
Spin up real databases and services in Docker from inside your tests.
A fast JavaScript runtime, package manager, bundler and test runner in one binary.
No votes yet. Tried it? Be the first to say.
One vote per person. No account needed.
Bun runs TypeScript and JSX directly, installs npm packages far faster than npm, and ships a Jest-compatible test runner and a bundler. It aims for Node.js compatibility, so most existing projects run with little or no change.
Node.js + npm + ts-node + Jest + a bundler
You want fewer moving parts and faster installs, scripts and tests in a JS/TS project. Great for scripts, CLIs and new services.
Runs JavaScript, TypeScript and JSX directly, with no build step or ts-node, on Apple's JavaScriptCore engine.
bun install reads your existing package.json and installs from the npm registry, typically far faster than npm.
bun test provides a Jest-compatible API (describe, it, expect, mocks, snapshots) with watch mode.
bun build bundles for the browser or the server and can compile a script into a single executable.
Built-in HTTP server (Bun.serve), SQLite driver (bun:sqlite), file I/O, password hashing, shell scripting (Bun.$) and an S3 client.
Implements most node:* modules and Node-API, so the majority of npm packages work unchanged.
Bun is a single executable written in Zig that embeds Apple's JavaScriptCore (the engine in Safari) rather than V8. Because the runtime, transpiler, package manager and test runner live in one binary, it can skip a lot of the glue other toolchains need. TypeScript is transpiled on the fly (types are stripped, not checked), and module resolution follows Node's rules so existing projects keep working.
You don't have to switch runtimes to benefit. A common path is:
bun install in an existing Node project. It reads package.json and writes a bun.lock file, and Node can still run the result.bun test on your test suite. Most Jest-style tests run unchanged.bun run for scripts and TypeScript one-offs instead of ts-node or tsx.// server.ts
const server = Bun.serve({
port: 3000,
fetch(req) {
const url = new URL(req.url);
if (url.pathname === '/health') return Response.json({ ok: true });
return new Response('Hello from Bun');
},
});
console.log(`Listening on ${server.url}`);// math.test.ts
import { expect, test } from 'bun:test';
test('adds', () => expect(1 + 2).toBe(3));bun run server.ts
bun test --watchbun build ./cli.ts --compile --outfile mycli produces a standalone executable, which is handy for distributing internal CLIs.bunx is Bun's equivalent of npx.tsc --noEmit (or your editor). Bun strips types for speed but does not check them.bun install or bun test in an existing Node project.curl -fsSL https://bun.sh/install | bash
bun init
bun test The default, most compatible runtime. Pair it with npm/pnpm, Vitest and a bundler for the same feature set.
Also runs TypeScript natively, with a security-permissions model and a built-in toolchain. Strong on web standards.
If you only want faster, disk-efficient installs while staying on Node.
If you only want a fast, modern test runner for a Node or Vite project.
Other tools that share topics with Bun.
Spin up real databases and services in Docker from inside your tests.
One fast tool for formatting and linting JS, TS, JSON and CSS.
Test and compare LLM prompts and models with assertions, locally or in CI.