Skip to content

testing

github-actions[bot] edited this page Jul 3, 2026 · 1 revision

ɳTasks Testing Guide

Overview

ɳTasks uses a three-layer test pyramid: unit, integration, and e2e. The React Native mobile app (apps/mobile/, this repo) uses jest-expo; the web SaaS (web/ntask/, separate repo) uses Vitest.


React Native App (apps/mobile/)

Unit + Integration tests — jest-expo

Stack: jest-expo preset · @testing-library/react-native · MSW for GraphQL mocks.

Run locally:

cd apps/mobile
pnpm test               # run once
pnpm test -- --watch    # watch mode
pnpm test -- --coverage # coverage report (>= 80% line required)

CI gate:

make ci-local-rn  # RN mobile only: lint + typecheck + jest

Config: apps/mobile/jest.config.js (preset: jest-expo, pnpm-aware transformIgnorePatterns).

Test locations:

Directory What's tested
apps/mobile/__tests__/ hooks, utilities, auth, validation, offline queue

Coverage: pnpm test -- --coverage must report >= 80% line on TS source files.


E2E tests — Detox

Framework: Detox (iOS + Android simulator).

Note: E2E tests are currently .skip'd pending simulator provisioning in local CI. See .claude/inbox/pci-native-simulator-detox.md.

Run manually (simulator required):

cd apps/mobile
pnpm e2e:ios      # iOS simulator
pnpm e2e:android  # Android emulator

Test location: apps/mobile/e2e/taskFlow.e2e.ts — covers create → list → complete task flow.


Web SaaS (web/ntask/, separate repo)

Unit tests — Vitest

Run locally:

cd web/ntask
pnpm test               # run once
pnpm test -- --watch    # watch mode
pnpm test -- --coverage # coverage report

CI Gate Summary

App Gate command What runs
apps/mobile/ make ci-local-rn lint + typecheck + jest (no simulator)
web/ntask/ (separate repo) cd web/ntask && pnpm test Vitest unit tests
All (this repo) make ci-local RN lint + typecheck + jest

E2E (Detox) is NOT part of make ci-local — requires a separate simulator session.

Clone this wiki locally