Skip to content

Commit

Permalink
chore: move jest test to vitest (#130)
Browse files Browse the repository at this point in the history
### 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
  • Loading branch information
yuming-long authored Oct 21, 2024
1 parent 5886926 commit d50004b
Show file tree
Hide file tree
Showing 10 changed files with 2,896 additions and 6,824 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ check:
## test-unit: run unit tests
.PHONY: test-unit
test-unit:
npx jest --verbose --detectOpenHandles --config jest.config.js test/unit
npx vitest --dir test/unit --run --reporter verbose --config vitest.config.mjs

## test-integration: run integration tests
.PHONY: test-integration
test-integration:
npx jest --verbose --detectOpenHandles --config jest.config.js test/integration --forceExit
npx vitest --dir test/integration --run --reporter verbose --config vitest.config.mjs

## test: run all tests
.PHONY: test
Expand Down
4 changes: 1 addition & 3 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ typescript:
pdf-lib: ^1.17.1
devDependencies:
'@types/async': ^3.2.24
'@types/jest': ^29.5.12
jest: ^29.7.0
ts-jest: ^29.1.2
vitest: ^2.1.3
peerDependencies: {}
additionalPackageJSON: {}
author: Unstructured
Expand Down
16 changes: 0 additions & 16 deletions jest.config.js

This file was deleted.

Loading

0 comments on commit d50004b

Please sign in to comment.