Using Bun for Fast JavaScript Development and Testing

Bun is a fast all-in-one JavaScript runtime and toolkit designed as a drop-in replacement for Node.js. It implements a native bundler, transpiler, task runner, and npm-compatible package manager - all in a single executable. Bun focuses on three main design goals: Speed (Bun starts fast and runs fast), Elegant APIs (minimal set of highly-optimized APIs), and Cohesive Developer Experience (complete toolkit for building JavaScript apps). In the following tutorial I’m going to demonstrate how to use Bun for common development tasks like package management, running TypeScript, bundling, and testing. ...

July 15, 2026 · 5 min · 967 words · Micha Kops

Writing a React Component Test with Jest and Testing Library

Goals render a React component in a test mock HTTP/REST calls to the backend verify results achieve the above using typescript, jest and testing-library Application under Test This is our application’s shortened package.json, generated by create-react-app, adding dependencies for …​ jest testing-library typescript react dom implementations (jest-dom/react-dom) axios (for the HTTP/REST call) package.json { [..] "dependencies": { "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "@types/jest": "^26.0.15", "@types/node": "^12.0.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "react": "^17.0.2", "react-dom": "^17.0.2", "react-scripts": "4.0.3", "typescript": "^4.1.2", "web-vitals": "^1.0.1", "axios": "^0.19.0" }, [..] "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, [..] } ...

June 4, 2021 · 3 min · 559 words · Micha Kops