fix: failing tests

This commit is contained in:
Dan Ditomaso committed 2025-03-06 16:09:22 -05:00
1 parent c115ac0749
commit d70b14b12b
7 files changed
+320 -500

No files matched your search

+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();