Skip to main content
MIRA currently has a Python test suite covering the RLM reasoning engine. TypeScript tests for the Electron main process and renderer are scaffolded (Jest is configured in jest.config.json) but not yet written — contributions welcome.

TypeScript tests (Jest)

Configuration

jest.config.json is at the project root. The test environment is node and the pattern matches **/__tests__/**/*.test.ts and **/?(*.)+(spec|test).ts files co-located with source files.

Running (once tests exist)

Mocking strategy

When tests are added, the established mock pattern is:
  • better-sqlite3 — mock with an in-memory database in test setup
  • electron — mocked via src/__mocks__/electron.ts (already present)
  • keytar / safeStorage — mock to avoid OS encryption calls in CI

Python tests (pytest)

The RLM engine (rlm/) has a test suite using pytest.

Running tests

Test files

Test fixtures

Test documents and sample data are in rlm/tests/.
The NAE engine (resources/nae_context/) does not yet have its own test suite. Its correctness is covered indirectly by the RLM integration tests and manual QA.