fix: failing tests

This commit is contained in:
Dan Ditomaso
2025-03-06 16:09:22 -05:00
parent c115ac0749
commit d70b14b12b
7 changed files with 320 additions and 500 deletions
+8 -7
View File
@@ -1,16 +1,17 @@
// Try this import style instead
import { expect, afterEach } from 'vitest';
import { cleanup } from '@testing-library/react';
import * as matchers from "@testing-library/jest-dom/matchers";
import * as matchers from '@testing-library/jest-dom/matchers';
class ResizeObserver {
// Add the matchers (should work with * as import)
expect.extend(matchers);
// Mock ResizeObserver
global.ResizeObserver = class {
observe() { }
unobserve() { }
disconnect() { }
}
globalThis.ResizeObserver = ResizeObserver;
expect.extend(matchers);
};
afterEach(() => {
cleanup();