test: add jsdom environment for watercrawl component tests

- Specified jsdom as the testing environment for the watercrawl component tests.
- This change ensures compatibility with DOM-related testing utilities provided by the testing library.
This commit is contained in:
CodingOnStar
2026-01-23 14:35:00 +08:00
parent 347ad6a11a
commit 399475252f
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,6 @@
/**
* @vitest-environment jsdom
*/
import type { ReactNode } from 'react'
import type { ModalContextState } from '@/context/modal-context'
import type { ProviderContextState } from '@/context/provider-context'

View File

@ -1,3 +1,6 @@
/**
* @vitest-environment jsdom
*/
import type { Mock } from 'vitest'
import type { CrawlOptions, CrawlResultItem } from '@/models/datasets'
import { fireEvent, render, screen, waitFor } from '@testing-library/react'