Skip to content

Commit

Permalink
tests: Update vitest and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nellh committed Sep 8, 2023
1 parent 4f852a3 commit 6ec6972
Show file tree
Hide file tree
Showing 11 changed files with 583 additions and 161 deletions.
411 changes: 328 additions & 83 deletions .pnp.cjs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"@sentry/cli": "1.37.4",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/jest-dom": "6.1.3",
"@types/ioredis-mock": "^8.2.2",
"@types/jsdom": "^16",
"@types/testing-library__jest-dom": "5.14.5",
Expand Down Expand Up @@ -49,7 +49,7 @@
"typescript": "5.1.6",
"vite": "3.2.7",
"vitest": "0.33.0",
"vitest-fetch-mock": "0.2.1",
"vitest-fetch-mock": "0.2.2",
"vitest-mongodb": "^0.0.4"
},
"workspaces": [
Expand Down
4 changes: 2 additions & 2 deletions packages/openneuro-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"universal-cookie": "^4.0.4"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/jest-dom": "6.1.3",
"@testing-library/react": "^11.1.0",
"@types/jsdom": "^16",
"@types/node": "18.11.9",
Expand All @@ -65,7 +65,7 @@
"stream-browserify": "^3.0.0",
"typescript": "5.1.6",
"vite": "^3.2.7",
"vitest": "0.33.0"
"vitest": "0.34.4"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/openneuro-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/node": "18.11.9",
"core-js": "^3.10.1",
"metro-memory-fs": "^0.73.3",
"vitest": "0.33.0"
"vitest": "0.34.4"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/openneuro-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@openneuro/server": "^4.20.0-alpha.1",
"core-js": "^3.10.1",
"ioredis-mock": "^8.8.1",
"vitest": "0.33.0"
"vitest": "0.34.4"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/openneuro-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"react-usestateref": "^1.0.5"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/jest-dom": "6.1.3",
"@testing-library/react": "^11.1.0",
"@types/bytes": "^3",
"@types/mdx-js__react": "^1",
Expand All @@ -43,7 +43,7 @@
"core-js": "^3.14.0",
"sass": "^1.32.8",
"typescript": "5.1.6",
"vitest": "0.33.0"
"vitest": "0.34.4"
},
"scripts": {
"build": "tsc --build"
Expand Down
2 changes: 1 addition & 1 deletion packages/openneuro-indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/node": "18.11.9",
"@types/tsc-watch": "^4",
"core-js": "^3.10.1",
"vitest": "0.33.0"
"vitest": "0.34.4"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/openneuro-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@types/jsonwebtoken": "^8",
"@types/node": "18.11.9",
"core-js": "^3.10.1",
"vitest": "0.33.0"
"vitest": "0.34.4"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/openneuro-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
"supertest": "^3.0.0",
"ts-node-dev": "1.1.6",
"tsc-watch": "^4.2.9",
"vitest": "0.33.0",
"vitest-fetch-mock": "^0.2.1"
"vitest": "0.34.4",
"vitest-fetch-mock": "0.2.2"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import '@testing-library/jest-dom'
import '@testing-library/jest-dom/vitest'
import createFetchMock from 'vitest-fetch-mock'
import { vi, afterAll } from 'vitest'
import { setup, teardown } from 'vitest-mongodb'

// @ts-expect-error vitest-fetch-mock has out of date typing but still works
const fetchMock = createFetchMock(vi)

// sets globalThis.fetch and globalThis.fetchMock to our mocked version
Expand Down
Loading

0 comments on commit 6ec6972

Please sign in to comment.