Add the text below into package.json for npm test to run test.
"scripts": {
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run"
},Run npm install -D vitest to install vitest in your folder or workspace
Run tsc --init to create tsconfig.json file
Run npm test and change a test or source code to see HMR in action!