Skip to content

Commit

Permalink
proto: move to vitest (#1795)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-nascimento authored Dec 12, 2024
1 parent ecefe23 commit 6fef293
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 56 deletions.
30 changes: 0 additions & 30 deletions packages/proto/jest.config.ts

This file was deleted.

13 changes: 5 additions & 8 deletions packages/proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"build": "yarn buf:generate && tsc",
"cb": "yarn clean && yarn build",
"clean": "yarn buf:clean && rm -rf ./dist",
"my-jest": "NODE_EXTRA_CA_CERTS=${HOME}/river-ca-cert.pem yarn node -r ../../scripts/node-no-warn.js --experimental-vm-modules $(yarn bin jest) --passWithNoTests",
"test": "yarn my-jest",
"test:ci": "yarn my-jest",
"test": "vitest run",
"test:watch": "vitest --watch",
"test:ci": "yarn test",
"watch": "node scripts/watch_proto_files.cjs",
"watch:go": "node scripts/watch_proto_files_go.cjs"
},
Expand All @@ -26,14 +26,11 @@
"@bufbuild/protoc-gen-es": "^1.9.0",
"@connectrpc/protoc-gen-connect-es": "^1.4.0",
"@river-build/proto-source": "workspace:^",
"@types/jest": "^29.5.3",
"@types/node": "^20.5.0",
"jest": "^29.6.2",
"jest-extended": "^4.0.1",
"lodash.debounce": "^4.0.8",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"vitest": "^2.1.5"
},
"files": [
"/dist"
Expand Down
5 changes: 5 additions & 0 deletions packages/proto/src/tests/stub.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('stub', () => {
it('should pass', () => {
expect(true).toBe(true)
})
})
3 changes: 2 additions & 1 deletion packages/proto/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "../tsconfig.base.json",
"compilerOptions": {
"rootDir": "./src" /* Specify the root folder within your source files. */,
"outDir": "./dist" /* Specify an output folder for all emitted files. */
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
"types": ["vitest/globals"]
},
"include": ["./src/**/*"]
}
3 changes: 3 additions & 0 deletions packages/proto/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { rootConfig } from '../../vitest.config.mjs'

export default rootConfig
1 change: 1 addition & 0 deletions packages/workers/merkle-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.7.0",
"jest-environment-miniflare": "^2.14.2",
"jest-extended": "^4.0.1",
"miniflare": "^3.20240524.1",
"prettier": "^2.8.8",
"ts-jest": "^29.1.1",
Expand Down
1 change: 1 addition & 0 deletions packages/workers/worker-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"eslint": "^8.53.0",
"jest": "^29.6.2",
"jest-environment-miniflare": "^2.14.2",
"jest-extended": "^4.0.1",
"miniflare": "^3.20240524.1",
"prettier": "^2.8.8",
"ts-jest": "^29.1.1",
Expand Down
33 changes: 16 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6614,14 +6614,11 @@ __metadata:
"@bufbuild/protoc-gen-es": ^1.9.0
"@connectrpc/protoc-gen-connect-es": ^1.4.0
"@river-build/proto-source": "workspace:^"
"@types/jest": ^29.5.3
"@types/node": ^20.5.0
jest: ^29.6.2
jest-extended: ^4.0.1
lodash.debounce: ^4.0.8
ts-jest: ^29.1.1
ts-node: ^10.9.1
typescript: ^5.1.6
vitest: ^2.1.5
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -18543,7 +18540,7 @@ __metadata:
languageName: node
linkType: hard

"jest-diff@npm:>=29.4.3 < 30, jest-diff@npm:^29.4.1":
"jest-diff@npm:>=29.4.3 < 30, jest-diff@npm:^29.0.0, jest-diff@npm:^29.4.1":
version: 29.7.0
resolution: "jest-diff@npm:29.7.0"
dependencies:
Expand All @@ -18555,7 +18552,7 @@ __metadata:
languageName: node
linkType: hard

"jest-diff@npm:^29.0.0, jest-diff@npm:^29.6.2":
"jest-diff@npm:^29.6.2":
version: 29.6.2
resolution: "jest-diff@npm:29.6.2"
dependencies:
Expand Down Expand Up @@ -18653,8 +18650,8 @@ __metadata:
linkType: hard

"jest-extended@npm:^4.0.1":
version: 4.0.1
resolution: "jest-extended@npm:4.0.1"
version: 4.0.2
resolution: "jest-extended@npm:4.0.2"
dependencies:
jest-diff: ^29.0.0
jest-get-type: ^29.0.0
Expand All @@ -18663,24 +18660,24 @@ __metadata:
peerDependenciesMeta:
jest:
optional: true
checksum: a5d6a9153c7b7fe48602bb3381f46bbbbb034bc2722497d0fde6b0eac81b8fbda1e69fb59ca72ec545fea7959e065a96500620a1cf0aba77a719455ff5f93da8
checksum: afdc255eec7caa173f9e805e94562273d8b8aa4c7ab9b396668f018c18ea5236270a6ac499ca84b8c60e90ccbe9ccb4aebf998daef13aec9542c426df1df6079
languageName: node
linkType: hard

"jest-get-type@npm:^29.0.0, jest-get-type@npm:^29.4.3":
version: 29.4.3
resolution: "jest-get-type@npm:29.4.3"
checksum: 6ac7f2dde1c65e292e4355b6c63b3a4897d7e92cb4c8afcf6d397f2682f8080e094c8b0b68205a74d269882ec06bf696a9de6cd3e1b7333531e5ed7b112605ce
languageName: node
linkType: hard

"jest-get-type@npm:^29.6.3":
"jest-get-type@npm:^29.0.0, jest-get-type@npm:^29.6.3":
version: 29.6.3
resolution: "jest-get-type@npm:29.6.3"
checksum: 88ac9102d4679d768accae29f1e75f592b760b44277df288ad76ce5bf038c3f5ce3719dea8aa0f035dac30e9eb034b848ce716b9183ad7cc222d029f03e92205
languageName: node
linkType: hard

"jest-get-type@npm:^29.4.3":
version: 29.4.3
resolution: "jest-get-type@npm:29.4.3"
checksum: 6ac7f2dde1c65e292e4355b6c63b3a4897d7e92cb4c8afcf6d397f2682f8080e094c8b0b68205a74d269882ec06bf696a9de6cd3e1b7333531e5ed7b112605ce
languageName: node
linkType: hard

"jest-haste-map@npm:^29.6.2":
version: 29.6.2
resolution: "jest-haste-map@npm:29.6.2"
Expand Down Expand Up @@ -20681,6 +20678,7 @@ __metadata:
jest: ^29.6.2
jest-environment-jsdom: ^29.7.0
jest-environment-miniflare: ^2.14.2
jest-extended: ^4.0.1
miniflare: ^3.20240524.1
prettier: ^2.8.8
ts-jest: ^29.1.1
Expand Down Expand Up @@ -30372,6 +30370,7 @@ __metadata:
ethers: ^5.7.2
jest: ^29.6.2
jest-environment-miniflare: ^2.14.2
jest-extended: ^4.0.1
miniflare: ^3.20240524.1
prettier: ^2.8.8
ts-jest: ^29.1.1
Expand Down

0 comments on commit 6fef293

Please sign in to comment.