Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.16 KB

File metadata and controls

34 lines (25 loc) · 1.16 KB

Testing

Running Tests

To run all tests:

./run_all_tests.sh

This will:

  1. Run unit tests (31 tests) - uses mocked vim APIs for speed
  2. Run integration tests (5 tests) - uses real Neovim with actual file operations

Test Structure

  • run_tests.lua - Test runner for unit tests (with mocks)
  • run_all_tests.sh - Main script that runs everything
  • tests/run_real_test.lua - Runner for integration tests (real Neovim)
  • tests/run_integration_tests.sh - Helper for integration tests

Unit Tests

  • tests/collectors_spec.lua - Tests for selection and diagnostics collectors
  • tests/core_spec.lua - Tests for util, token_budget, and config modules
  • tests/integration_spec.lua - Tests for the assembly module
  • tests/lsp_collectors_spec.lua - Tests for types and callgraph collectors (mocked)

Integration Tests

  • tests/lsp_integration_real_spec.lua - Tests LSP collectors with real TypeScript files and buffers

Why Two Test Approaches?

  • Unit tests use mocks for speed and isolation
  • Integration tests use real Neovim to verify actual behavior with files and buffers
  • They run in separate processes to avoid state contamination