Skip to content

Commit

Permalink
[api] demonstrate vitest allows top-level await where Jest does not (…
Browse files Browse the repository at this point in the history
…see vitest:server script)
  • Loading branch information
freemvmt committed Aug 22, 2024
1 parent 57484c9 commit 380c91c
Show file tree
Hide file tree
Showing 4 changed files with 472 additions and 33 deletions.
7 changes: 6 additions & 1 deletion api.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"test": "TZ=Europe/London NODE_OPTIONS='$NODE_OPTIONS --experimental-vm-modules' jest --silent",
"test:coverage": "TZ=Europe/London NODE_OPTIONS='$NODE_OPTIONS --experimental-vm-modules' jest; open ./coverage/lcov-report/index.html",
"test:watch": "TZ=Europe/London NODE_OPTIONS='$NODE_OPTIONS --experimental-vm-modules' jest --coverage=false --watch",
"vitest": "TZ=Europe/London vitest run",
"vitest:server": "TZ=Europe/London vitest run server.test.js",
"vitest:coverage": "TZ=Europe/London vitest run --coverage",
"vitest:watch": "TZ=Europe/London vitest",
"build": "rimraf ./dist && npx tsc && pnpm copy-swagger-files",
"prepare": "cd .. && husky install api.planx.uk/.husky",
"copy-swagger-files": "copyfiles '**/docs.yaml' dist"
Expand Down Expand Up @@ -118,7 +122,8 @@
"ts-node": "^10.9.2",
"tsx": "^4.16.2",
"typescript": "^5.5.2",
"uuid": "^10.0.0"
"uuid": "^10.0.0",
"vitest": "^2.0.5"
},
"pnpm": {
"peerDependencyRules": {
Expand Down
Loading

0 comments on commit 380c91c

Please sign in to comment.