Use @testing-library/preact rendered under jsdom (registered via test/register.js) so the Post-Preact .jsx components and pages are exercised through the real automatic-runtime render path instead of the legacy el() DOM-helper API the tests were written against. - Add jsdom + @testing-library/preact dev deps and a jsdom globals setup in ui/test/register.js (window/document/navigator/getComputedStyle/...). - Switch the .jsx loader hook to the automatic JSX runtime to match @preact/preset-vite, so source files that shadow h (mapping-editor) and Fragment/children arrays work exactly as in the Vite build. - Migrate captures, config-row, mappings, settings-update-status, task-logs, settings-lifecycle, settings-schema, tasks-actions and the chat-app tests to render the Preact components and query the DOM via testing-library. - Fix a real render bug in tasks.jsx: <h.Fragment> is not rendered by the automatic runtime (rows came out as [object Object]); use the imported <Fragment> instead, matching the other migrated modules.
20 lines
413 B
JSON
20 lines
413 B
JSON
{
|
|
"name": "archie-dashboard",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"test": "node --import ./test/register.js --test \"test/*.test.js\""
|
|
},
|
|
"dependencies": {
|
|
"preact": "^10.26.0"
|
|
},
|
|
"devDependencies": {
|
|
"@preact/preset-vite": "^2.10.0",
|
|
"@testing-library/preact": "^3.2.4",
|
|
"jsdom": "^30.0.1",
|
|
"vite": "^8.0.0"
|
|
}
|
|
}
|