Skip to content

Commit d50004b

Browse files
authored
chore: move jest test to vitest (#130)
### Summary as suggested by speakeasy: > Also noticed that your installation of Jest in the SDK repo is causing an npm audit warning with 1 high severity vulnerability. If you're keen to switch then I highly recommend [vitest](https://vitest.dev/). It's a mostly drop-in alternative and requires no config to work. We use it to test our SDKs. Also found that its easy to add coverage report just by appending `--coverage` add the end of the make test commands, but tbd in the future ### Test ci should work as before
1 parent 5886926 commit d50004b

File tree

10 files changed

+2896
-6824
lines changed

10 files changed

+2896
-6824
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ check:
3434
## test-unit: run unit tests
3535
.PHONY: test-unit
3636
test-unit:
37-
npx jest --verbose --detectOpenHandles --config jest.config.js test/unit
37+
npx vitest --dir test/unit --run --reporter verbose --config vitest.config.mjs
3838

3939
## test-integration: run integration tests
4040
.PHONY: test-integration
4141
test-integration:
42-
npx jest --verbose --detectOpenHandles --config jest.config.js test/integration --forceExit
42+
npx vitest --dir test/integration --run --reporter verbose --config vitest.config.mjs
4343

4444
## test: run all tests
4545
.PHONY: test

gen.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ typescript:
1717
pdf-lib: ^1.17.1
1818
devDependencies:
1919
'@types/async': ^3.2.24
20-
'@types/jest': ^29.5.12
21-
jest: ^29.7.0
22-
ts-jest: ^29.1.2
20+
vitest: ^2.1.3
2321
peerDependencies: {}
2422
additionalPackageJSON: {}
2523
author: Unstructured

jest.config.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)