migrate pure-logic tests to vitest (phase 1)

This commit is contained in:
Samuel Newman
2026-06-29 18:11:31 +03:00
parent dd85eb0b07
commit a70caf1829
25 changed files with 280 additions and 63 deletions
+16
View File
@@ -0,0 +1,16 @@
/*
* Stub for @sentry/react-native. The real package is CJS and requires
* `react-native` internally, which boots the native runtime under node. Many
* test-reachable modules pull it in transitively via #/logger. We only need
* the surface sentryTransport touches (src/logger/transports/sentry.ts).
*
* Aliased in place of @sentry/react-native via resolve.alias in
* vitest.config.ts. Tests that assert on Sentry calls (logger.test.ts) still
* vi.mock it directly, which takes precedence.
*/
import {vi} from 'vitest'
export const addBreadcrumb = vi.fn()
export const captureException = vi.fn()
export const captureMessage = vi.fn()
export const init = vi.fn()