変更の検証・テストの追加を行う人向け。
You can run non-backend tests by executing following commands:
pnpm --filter frontend test
pnpm --filter misskey-js testBackend tests require manual preparation of servers. See the next section for more on this.
There are three types of test codes for the backend:
- Unit tests:
/packages/backend/test/unit - Single-server E2E tests:
/packages/backend/test/e2e - Multiple-server E2E tests:
/packages/backend/test-federation
- Create a config file:
cp .github/misskey/test.yml .config/- Start DB and Redis servers for testing:
docker compose -f packages/backend/test/compose.yml upInstead, you can prepare an empty (data can be erased) DB and edit .config/test.yml appropriately.
- Run all tests:
pnpm --filter backend test # unit tests
pnpm --filter backend test:e2e # single-server E2E testsIf you want to run a specific test, run as a following command:
pnpm --filter backend test -- packages/backend/test/unit/activitypub.ts
pnpm --filter backend test:e2e -- packages/backend/test/e2e/nodeinfo.tsSee /packages/backend/test-federation/README.md.
Misskey uses GitHub Actions for executing automated tests.
Configuration files are located in /.github/workflows.