Skip to content

Tests ​

Tests run with Vitest.

Unit tests ​

bash
pnpm exec vitest run tests/unit

These cover Max's logic in lib/max/: the insight rules, the split, the drafted messages and the sentence parser in all three languages. They need no database.

Integration tests ​

tests/integration/ covers the server actions against a real database: creating a plan, answering, taking and giving up an item, and two people taking the same item at once.

They need updating

The setup in tests/setup/db.ts still creates SQLite databases, and the schema is now PostgreSQL, so these tests fail before they start. pnpm test runs both suites and reports those failures.

Until the setup is updated, run the unit tests on their own with the command above.

Type checking ​

bash
pnpm exec tsc --noEmit

pnpm build type-checks as well.