messenzy-widget/package.json
Serge RAKOTO HARRY-NAIVO ca084735ac chore(test): bootstrap vitest + jsdom test infrastructure
Add vitest 4.1, jsdom 25, and @testing-library/preact as devDeps so the
widget gets a real test surface for the upcoming Shadow DOM mount work.

- vitest.config.ts mirrors the build aliases (preact/compat) and uses
  jsdom for DOM-touching tests.
- tests/setup.ts is the place to add polyfills as the surface grows.
- tests/unit/smoke.test.ts confirms vitest runs, jsdom is wired, and
  Shadow DOM API is available.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 19:50:45 +02:00

26 lines
562 B
JSON

{
"name": "messenzy-widget",
"version": "0.1.0",
"description": "Embeddable JS chat widget for Messenzy",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"preact": "^10.19.0"
},
"devDependencies": {
"@testing-library/preact": "^3.2.4",
"@types/node": "^22.0.0",
"jsdom": "^25.0.0",
"typescript": "^5.6.0",
"vite": "^6.0.0",
"vitest": "^4.1.4"
}
}