test(history): jsdom/renderHook lane + useBackToExit back-ladder tests
First DOM-capable vitest lane for the repo: default env stays node (pure lib helpers), a test opts into jsdom per-file with a // @vitest-environment jsdom docblock; plugin-react wired for JSX/hook tests. Adds jsdom + @testing-library/react devDeps and 3 back-ladder tests (LIFO peel, stacks over useBackToClose, inactive layer is transparent) driven by direct popstate dispatch — deterministic, no dependency on jsdom's async back(). Closes the deferred R2 component-test gap (useBackToExit).
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
"devDependencies": {
|
||||
"@eslint/js": "9.39.1",
|
||||
"@playwright/test": "^1.61.1",
|
||||
"@testing-library/react": "^16.3.2",
|
||||
"@types/node": "^26.1.1",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
@@ -47,6 +48,7 @@
|
||||
"eslint-plugin-react-hooks": "5.2.0",
|
||||
"eslint-plugin-react-refresh": "0.4.24",
|
||||
"globals": "16.5.0",
|
||||
"jsdom": "^25.0.1",
|
||||
"knip": "6.27.0",
|
||||
"postcss": "^8.4.39",
|
||||
"prettier": "3.6.2",
|
||||
|
||||
Reference in New Issue
Block a user