Skip to content

Commit

Permalink
Migrate tests to vitest
Browse files Browse the repository at this point in the history
- remove lint-staged
  • Loading branch information
gilbarbara committed Mar 29, 2024
1 parent 5aff1d7 commit 6ab247c
Show file tree
Hide file tree
Showing 15 changed files with 1,068 additions and 2,008 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
./node_modules/.bin/repo-tools check-remote && ./node_modules/.bin/lint-staged
./node_modules/.bin/repo-tools check-remote && npm run validate
41 changes: 0 additions & 41 deletions jest.config.ts

This file was deleted.

30 changes: 10 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,38 +55,37 @@
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.2",
"@types/exenv": "^1.2.2",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.30",
"@types/once": "^1.4.4",
"@types/react": "^18.2.73",
"@types/react-dom": "^18.2.23",
"@vitejs/plugin-react-swc": "^3.6.0",
"@vitest/coverage-v8": "^1.4.0",
"del-cli": "^5.1.0",
"fix-tsup-cjs": "^1.2.0",
"husky": "^9.0.11",
"is-ci-cli": "^2.2.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-extended": "^4.0.2",
"jest-fetch-mock": "^3.0.3",
"jest-watch-typeahead": "^2.2.2",
"lint-staged": "^15.2.2",
"jsdom": "^24.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"repo-tools": "^0.3.1",
"size-limit": "^11.1.2",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tsup": "^8.0.2",
"typescript": "^5.4.3"
"typescript": "^5.4.3",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.4.0",
"vitest-fetch-mock": "^0.2.2"
},
"scripts": {
"build": "npm run clean && tsup && fix-tsup-cjs",
"clean": "del dist/*",
"watch": "tsup --watch",
"lint": "eslint --fix src test",
"test": "is-ci \"test:coverage\" \"test:watch\"",
"test:coverage": "jest --bail --coverage",
"test:watch": "jest --watchAll --verbose",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest watch",
"typecheck": "tsc -p test/tsconfig.json",
"typevalidation": "attw -P",
"format": "prettier \"**/*.{js,jsx,json,yml,yaml,css,less,scss,ts,tsx,md,graphql,mdx}\" --write",
Expand All @@ -110,7 +109,7 @@
"eslintConfig": {
"extends": [
"@gilbarbara/eslint-config",
"@gilbarbara/eslint-config/jest",
"@gilbarbara/eslint-config/vitest",
"@gilbarbara/eslint-config/testing-library"
],
"overrides": [
Expand All @@ -133,15 +132,6 @@
"demo"
],
"prettier": "@gilbarbara/prettier-config",
"lint-staged": {
"*.(ts|tsx)": [
"eslint --fix",
"jest --bail --findRelatedTests"
],
"*.(js|jsx|json|yml|yaml|ts|tsx|md|mdx)": [
"prettier --write"
]
},
"size-limit": [
{
"name": "commonjs",
Expand Down
Loading

0 comments on commit 6ab247c

Please sign in to comment.