- Updated test files to use `afterAll` for restoring mocks, ensuring cleaner test environments. - Simplified platform mocking in `modifiers-napi` tests to avoid global state mutations. - Enhanced `useFrustrationDetection` tests with clearer structure and consistent timeout settings. - Consolidated React and Ink mocks into a dedicated `test-mock.ts` file for reuse across tests. - Improved readability and maintainability of tests by standardizing timeout configurations. - Adjusted imports and module mocks to prevent interference between test files.
10 lines
299 B
TypeScript
10 lines
299 B
TypeScript
import { mock } from 'bun:test'
|
|
import * as React from 'react'
|
|
|
|
mock.module('@anthropic/ink', () => ({
|
|
Box: (p: any) => React.createElement('box', p),
|
|
Pane: (p: any) => React.createElement('pane', p),
|
|
Text: (p: any) => React.createElement('text', p),
|
|
useTheme: () => ['dark', () => {}],
|
|
}))
|