test(web): add Vitest setup and unit tests for validations and utils

- Add vitest config and test script to web app
- Auth validation tests: phone format, password rules, registration flow
- Listing validation tests: all schema steps, constants, merged schema
- Utils tests: cn() class merging with Tailwind conflict resolution
- 36 tests across 3 test files

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-08 14:59:00 +07:00
parent 6baa4707de
commit cd2abdba7b
6 changed files with 349 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "vitest run",
"typecheck": "tsc --noEmit"
},
"dependencies": {
@@ -34,6 +35,7 @@
"postcss": "^8.4.0",
"tailwindcss": "^3.4.0",
"tailwindcss-animate": "^1.0.7",
"typescript": "^6.0.2"
"typescript": "^6.0.2",
"vitest": "^4.1.3"
}
}