Page MenuHomeDevCentral

Add root package.json with unified test script
Open, HighPublic

Description

No way to run all tests from the project root. Create a root package.json with npm test running both backend (Jest) and frontend (Vitest) via --prefix.

Add test:backend and test:frontend shortcuts.


  • Backend: cd backend && npm test (Jest)
  • Frontend: cd frontend && npm run test:unit (Vitest)

We could add a root package.json with a unified script. It would look like:

{
  "name": "servpulse",
  "private": true,
  "scripts": {
    "test": "npm test --prefix backend && npm run test:unit --prefix frontend",
    "test:backend": "npm test --prefix backend",
    "test:frontend": "npm run test:unit --prefix frontend"
  }
}

Then npm test from the project root runs everything.

Event Timeline

ieli triaged this task as Normal priority.Mon, Feb 16, 15:30
ieli created this task.
ieli raised the priority of this task from Normal to High.Mon, Feb 16, 15:33
ieli updated the task description. (Show Details)