97bfb8158d
* docs: update integration test commands for Vitest 4.0 Vitest 4.0 no longer supports custom CLI flags like --integrationTestsOnly. Updated documentation to use the new VITEST_MODE=integration environment variable syntax instead. Co-Authored-By: eunjae@cal.com <hey@eunjae.dev> * fix: load .env file in vitest config for integration tests Vitest 4.0 doesn't automatically load .env files into process.env. This caused integration tests to fail with ECONNREFUSED errors because DATABASE_URL was not available. Added loadEnv from Vite to load .env file at the start of vitest config. Co-Authored-By: eunjae@cal.com <hey@eunjae.dev> * chore: remove unnecessary comment Co-Authored-By: eunjae@cal.com <hey@eunjae.dev> * fix: only load .env vars if not already set Co-Authored-By: eunjae@cal.com <hey@eunjae.dev> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2.9 KiB
2.9 KiB
Build, Test & Development Commands
Development Commands
yarn dev- Start development server for web appyarn dev:all- Start web, website, and console appsyarn dev:api- Start web app with API proxy and APIyarn dev:console- Start web app with consoleyarn dx- Start development with database setup
Build Commands
yarn build- Build all packages and appsyarn build:ai- Build AI package specificallyyarn clean- Remove build artifacts (node_modules, .next, .turbo, dist)
Lint & Type Check
yarn lint- Run Biome across the codebaseyarn lint:fix- Run Biome and apply safe fixesyarn lint:report- Generate Biome lint reportyarn type-check- Run TypeScript type checkingyarn format- Format code with Biome
Testing Commands
Unit Tests
yarn test- Run unit tests (vitest)yarn test <filename>- Run tests for specific fileyarn test <filename> -t "<testName>"- Run specific test by name for specific fileyarn tdd- Run tests in watch modeyarn test:ui- Run tests with UI interface
Integration Tests
VITEST_MODE=integration yarn test- Run integration tests (vitest)VITEST_MODE=integration yarn test <filename>- Run integration tests for specific fileVITEST_MODE=integration yarn test <filename> -t "<testName>"- Run specific integration test by name for specific file
End-to-End Tests
yarn e2e- Run end-to-end tests (Playwright)yarn e2e <filename>- Run E2E tests for specific fileyarn e2e <filename> --grep "<testName>"- Run specific E2E test by nameyarn e2e:app-store- Run app store E2E testsyarn e2e:embed- Run embed E2E testsyarn test-e2e- Run database seed + E2E tests
Database Commands
yarn prisma- Run Prisma CLI commandsyarn db-seed- Seed database with test datayarn db-deploy- Deploy database migrationsyarn db-studio- Open Prisma Studiopsql "postgresql://postgres:@localhost:5432/calendso"- Connect to local PostgreSQL database
App Store Commands
yarn create-app- Create new app store integrationyarn edit-app- Edit existing appyarn delete-app- Delete appyarn app-store:build- Build app storeyarn app-store:watch- Watch app store for changes
Useful Development Patterns
Running Single Tests
# Unit test specific file
yarn vitest run packages/lib/some-file.test.ts
# Integration test specific file
VITEST_MODE=integration yarn test routing-form-response-denormalized.integration-test.ts
# E2E test specific file
yarn e2e tests/booking-flow.e2e.ts
# Run specific test by name
yarn e2e tests/booking-flow.e2e.ts --grep "should create booking"
Environment Setup
- Copy
.env.exampleto.envand configure - Copy
.env.appStore.exampleto.env.appStorefor app store development - Run
yarn dxfor initial development setup with database