Skip to content

Commit

Permalink
refactor: use vitest instead of jest
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexZeitler committed Aug 31, 2023
1 parent c73cfc8 commit 343d624
Show file tree
Hide file tree
Showing 4 changed files with 486 additions and 1,542 deletions.
15 changes: 3 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build": "tsc",
"prerelease": "yarn build",
"release": "standard-version",
"test": "jest",
"test": "npx vitest --dir test",
"lint-ts": "eslint --ext .ts ."
},
"repository": {
Expand All @@ -42,20 +42,11 @@
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^7.0.2",
"jest": "^29.4.2",
"prettier": "^2.8.4",
"should": "^13.2.3",
"standard-version": "^9.5.0",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^4.4.3"
},
"jest": {
"testRegex": "test/.+[Tt]ests?\\.tsx?$",
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"coverageDirectory": "./coverage/",
"collectCoverage": true
"typescript": "^4.4.3",
"vitest": "^0.34.3"
}
}
12 changes: 12 additions & 0 deletions test/hello.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'should'
import { hello } from '../src'
import { describe, expect, it } from 'vitest'

require('should')

describe('hello', () => {
it('should say name', () => {
const sut = hello('alex')
expect(sut).toEqual('hello, alex')
})
})
11 changes: 0 additions & 11 deletions test/hello_tests.ts

This file was deleted.

Loading

0 comments on commit 343d624

Please sign in to comment.