빈 catch 블록 3곳에 의도 주석 추가, test-setup.js 의 beforeEach 명시적 import. 우리 신규 코드의 lint error 0으로 정리. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
36 lines
774 B
JavaScript
36 lines
774 B
JavaScript
import { beforeEach } from 'vitest';
|
|
import '@testing-library/jest-dom/vitest';
|
|
|
|
// jsdom polyfills for react-flow
|
|
if (typeof window !== 'undefined') {
|
|
if (!window.matchMedia) {
|
|
window.matchMedia = (query) => ({
|
|
matches: false,
|
|
media: query,
|
|
onchange: null,
|
|
addEventListener: () => {},
|
|
removeEventListener: () => {},
|
|
addListener: () => {},
|
|
removeListener: () => {},
|
|
dispatchEvent: () => false,
|
|
});
|
|
}
|
|
if (!window.ResizeObserver) {
|
|
window.ResizeObserver = class {
|
|
observe() {}
|
|
unobserve() {}
|
|
disconnect() {}
|
|
};
|
|
}
|
|
if (!window.DOMMatrixReadOnly) {
|
|
window.DOMMatrixReadOnly = class {
|
|
constructor() {}
|
|
m22 = 1;
|
|
};
|
|
}
|
|
}
|
|
|
|
beforeEach(() => {
|
|
localStorage.clear();
|
|
});
|