/
githubmirror
/
tldraw
Обзор
Документация
Войти
/
githubmirror
/
tldraw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/worker-shared/src/sentry.test.ts
26 строк
701 B
Steve Ruiz
Automate docs, sort of (#6722)
06 окт 2025, 12:57
Не верифицирован
06 окт 2025, 12:57
4197e7a
Код
Авторство
О чём код?
import { describe, expect, it } from 'vitest' import { createSentry, SentryEnvironment } from './sentry' describe('sentry', () => { describe('createSentry', () => { it('returns null in development environment', () => { const ctx = { waitUntil: () => {} } as any const env: SentryEnvironment = { TLDRAW_ENV: 'development', } const result = createSentry(ctx, env) expect(result).toBe(null) }) it('throws when SENTRY_DSN is missing in production', () => { const ctx = { waitUntil: () => {} } as any const env: SentryEnvironment = { TLDRAW_ENV: 'production', } expect(() => createSentry(ctx, env)).toThrow('Missing required env var: SENTRY_DSN') }) }) })