Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.51 KB

File metadata and controls

67 lines (44 loc) · 1.51 KB
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')
  })
})

Running Tests

# 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

Key Features

  • 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

Next Steps

Ecosystem Integration

Besting is part of the Stacks ecosystem: