| title | description |
|---|---|
Getting Started |
Learn how to install and use besting for testing your applications. |
Use lifecycle hooks for setup and teardown:
import { beforeEach, describe, expect, test } from 'besting'
describe('User', () => {
let user
beforeEach(() => {
user = { name: 'John', email: 'john@example.com' }
})
test('has correct properties', () => {
expect(user.name).toBe('John')
expect(user.email).toBe('john@example.com')
})
})# Run all tests
bun test
# Run a specific test file
bun test path/to/test.ts
# Run with custom runner (ensures all test files are executed)
bun run test:custom
- Zero Dependencies - Lightweight with no external dependencies
- Virtual DOM - Lightning-fast DOM testing without browser downloads
- Fluent API - Chainable assertions for expressive tests
- Laravel-Inspired - Familiar API for database, API, and browser testing
- Full Bun Integration - Works with all Bun test features
- Learn about Assertions
- Explore DOM Testing
- Discover API Testing
- Set up Database Testing
- Try Browser Testing
Besting is part of the Stacks ecosystem:
- Stacks Framework - Full-stack framework
- clapp - CLI framework
- BunPress - Documentation generator