test(format): cover the relative-time tier boundaries
The repo had no unit-test runner, so this adds the minimum: vitest (3.x, as 4.x needs Vite 6), a node-env config deliberately separate from vite.config.ts so the production build never loads it, npm test / test:watch, and a knip entry so the config and specs are not reported unused. Browser flows stay in e2e/ under Playwright. The suite samples every tier at its exact opening second as well as inside it, and stubs i18n so each assertion lands on the key rather than the copy. An interior-only suite still passes when the range comparison flips to <=, which is how the tier shift went unnoticed for so long.
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
@@ -32,6 +34,7 @@
|
||||
"postcss": "^8.4.39",
|
||||
"tailwindcss": "^3.4.6",
|
||||
"typescript": "^5.5.3",
|
||||
"vite": "^5.3.4"
|
||||
"vite": "^5.3.4",
|
||||
"vitest": "^3.2.7"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user