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 15, 2024
1 parent 67bf489 commit e929cbf
Show file tree
Hide file tree
Showing 33 changed files with 574 additions and 1,771 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 && npm run e2e
./node_modules/.bin/repo-tools check-remote && npm run validate
40 changes: 0 additions & 40 deletions jest.config.ts

This file was deleted.

31 changes: 10 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,48 +59,46 @@
"@playwright/experimental-ct-react": "^1.42.1",
"@size-limit/preset-big-lib": "^11.0.3",
"@swc/core": "^1.4.6",
"@swc/jest": "^0.2.36",
"@testing-library/dom": "^9.3.4",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@total-typescript/shoehorn": "^0.1.2",
"@types/exenv": "^1.2.2",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.26",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.21",
"@types/scroll": "^3.0.3",
"@types/scrollparent": "^2.0.3",
"@vitejs/plugin-react-swc": "^3.6.0",
"@vitest/coverage-v8": "^1.3.1",
"caniuse-lite": "^1.0.30001597",
"cross-env": "^7.0.3",
"csstype": "^3.1.3",
"del-cli": "^5.1.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-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.0.3",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tsup": "^8.0.2",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.3.1"
},
"scripts": {
"build": " npm run clean && tsup && ts-node scripts/fix-cjs.ts",
"watch": "tsup --watch",
"clean": "del dist/*",
"lint": "eslint --fix src test",
"typecheck": "tsc --noEmit",
"typecheck": "tsc -p test/tsconfig.json",
"typevalidation": "attw -P",
"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",
"e2e": "playwright test -c playwright-ct.config.ts",
"e2e:debug": "npm run e2e -- --project=chromium --debug",
"e2e:ui": "npm run e2e -- --ui",
Expand All @@ -126,7 +124,7 @@
"eslintConfig": {
"extends": [
"@gilbarbara/eslint-config",
"@gilbarbara/eslint-config/jest",
"@gilbarbara/eslint-config/vitest",
"@gilbarbara/eslint-config/testing-library"
],
"overrides": [
Expand All @@ -148,15 +146,6 @@
]
},
"prettier": "@gilbarbara/prettier-config",
"lint-staged": {
"*.(ts|tsx)": [
"eslint --fix",
"jest --findRelatedTests --passWithNoTests"
],
"*.(css|graphql|js|json|jsx|less|md|mdx|scss|ts|tsx|yaml|yml)": [
"prettier --write"
]
},
"size-limit": [
{
"name": "commonjs",
Expand Down

0 comments on commit e929cbf

Please sign in to comment.