import '@testing-library/jest-dom';
import { theme } from 'antd';
import 'fake-indexeddb/auto';
import React from 'react';
import { vi } from 'vitest';
vi.mock('@lobehub/analytics/react', () => ({
useAnalytics: () => ({
analytics: {
track: vi.fn(),
},
}),
}));
if (typeof window === 'undefined') {
const { Crypto } = await import('@peculiar/webcrypto');
Object.defineProperty(global, 'crypto', {
value: new Crypto(),
writable: true,
});
}
theme.defaultConfig.hashed = false;
(global as any).React = React;