/** * yongren-dashboard-ui setup测试 * 验证测试环境配置是否正确 */ import '@testing-library/jest-dom' describe('yongren-dashboard-ui setup', () => { it('should have Taro environment variables set', () => { expect(process.env.TARO_ENV).toBe('h5') expect(process.env.TARO_PLATFORM).toBe('web') }) it('should have MutationObserver mock', () => { expect(typeof global.MutationObserver).toBe('function') }) it('should have IntersectionObserver mock', () => { expect(typeof global.IntersectionObserver).toBe('function') }) it('should have ResizeObserver mock', () => { expect(typeof global.ResizeObserver).toBe('function') }) it('should have matchMedia mock', () => { expect(typeof window.matchMedia).toBe('function') }) it('should have getComputedStyle mock', () => { expect(typeof window.getComputedStyle).toBe('function') }) it('should have getBoundingClientRect mock', () => { expect(typeof Element.prototype.getBoundingClientRect).toBe('function') }) })