test: set up Vitest with 61 frontend tests #46
Reference in New Issue
Block a user
Delete Branch "test/frontend-vitest-setup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
npm testbefore buildTest files
src/lib/utils.test.ts— 6 tests forcn()class merging utilitysrc/hooks/usePermissions.test.ts— 27 tests covering all roles (viewer, engineer, owner, super_admin) and resource-specific checkssrc/hooks/useTreeValidation.test.ts— 22 tests for name validation, structure validation, and warningssrc/store/userPreferencesStore.test.ts— 6 tests for store defaults and settersConfig changes
vite.config.ts— added Vitest test configurationtsconfig.app.json— excluded test files from production buildpackage.json— addedtestandtest:watchscripts.github/workflows/ci.yml— added test step before buildTest plan
npx vitest run)npm run build)🤖 Generated with Claude Code
🚅 Deployed to the patherly-pr-46 environment in selfless-grace