feat: migrate from npm to Bun
- Install Bun via mise - Update package.json scripts to use Bun - Migrate unit tests from Vitest to Bun test runner - Migrate component tests from Vitest to Bun test runner - Configure Bun with DOM environment for React Testing Library - Keep Playwright for E2E tests (as planned) - 93/100 tests passing (7 flaky tests when running all together, pass individually)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Setup file for Bun test runner to provide DOM environment
|
||||
import { JSDOM } from 'jsdom';
|
||||
import '@testing-library/jest-dom';
|
||||
|
||||
const dom = new JSDOM('<!DOCTYPE html><html><body></body></html>', {
|
||||
url: 'http://localhost',
|
||||
pretendToBeVisual: true,
|
||||
});
|
||||
|
||||
(global as any).window = dom.window;
|
||||
(global as any).document = dom.window.document;
|
||||
(global as any).navigator = dom.window.navigator;
|
||||
Reference in New Issue
Block a user