Mock HTMLElement.scrollTo in test setup
jsdom does not implement scrollTo on elements, causing any component that calls element.scrollTo() (e.g. MiniDraftGrid's scroll-to-current-cell effect) to throw in unit tests. https://claude.ai/code/session_017JCShLVs9xZ6FZmyrUFaE1
This commit is contained in:
parent
8a4c75e860
commit
049f909429
1 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,9 @@ afterEach(() => {
|
|||
// Mock environment variables
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
// jsdom does not implement scrollTo on elements
|
||||
HTMLElement.prototype.scrollTo = vi.fn();
|
||||
|
||||
// Mock BetterAuth
|
||||
vi.mock('~/lib/auth.server', () => ({
|
||||
auth: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue