# Test Utilities

Published test helpers for downstream consumers of `@elevasis/core`.

The public `@elevasis/core/test-utils` subpath exposes:

- `RLSTestContext` for dev-database RLS integration tests
- `setupMatchMedia`, `setupResizeObserver`, and `setupBrowserMocks` for jsdom/browser test setup
- `TEST_USERS`, `TEST_ORGS`, `TEST_MEMBERSHIPS`, and related fixture factories
- `createMockSupabaseClient`, `createMockWorkOSClient`, and related mocks
- base entity factories such as `makeProject`, `makeDeal`, and `makeTask`
- organization model/profile builders such as `makeOrganizationModel`, `makeInitializationState`, and `makeUserProfile`

## Published Usage

### Browser Mocks

```typescript
import { setupBrowserMocks } from '@elevasis/core/test-utils'

setupBrowserMocks()
```

### RLS Integration Tests

```typescript
import { RLSTestContext } from '@elevasis/core/test-utils'

const ctx = new RLSTestContext()
```

`RLSTestContext` requires a configured Supabase development environment:

- `SUPABASE_URL`
- `SUPABASE_ANON_KEY`
- `SUPABASE_SERVICE_KEY`
- `SUPABASE_JWT_SECRET`
