Skip to content

Commit

Permalink
Migrate tests to vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbarbara committed Oct 4, 2023
1 parent 1a93a8e commit af03d64
Show file tree
Hide file tree
Showing 14 changed files with 508 additions and 494 deletions.
38 changes: 0 additions & 38 deletions jest.config.ts

This file was deleted.

26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,43 +63,39 @@
"@testing-library/react": "^14.0.0",
"@types/exenv": "^1.2.0",
"@types/fetch-mock": "^7.3.6",
"@types/jest": "^29.5.5",
"@types/node": "^20.8.2",
"@types/node-fetch": "^2.6.6",
"@types/react": "^18.2.24",
"@types/react-dom": "^18.2.8",
"@vitest/coverage-v8": "^0.34.6",
"browser-cache-mock": "^0.1.7",
"cross-fetch": "^4.0.0",
"del-cli": "^5.1.0",
"fix-tsup-cjs": "^1.2.0",
"http-server": "^14.1.1",
"husky": "^8.0.3",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-extended": "^4.0.1",
"jest-fetch-mock": "^3.0.3",
"jest-serializer-html": "^7.1.0",
"jest-watch-typeahead": "^2.2.2",
"jsdom": "^22.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"repo-tools": "^0.2.2",
"size-limit": "^9.0.0",
"start-server-and-test": "^2.0.1",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsup": "^7.2.0",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"vitest": "^0.34.6",
"vitest-fetch-mock": "^0.2.2"
},
"scripts": {
"build": "pnpm run clean && tsup && fix-tsup-cjs",
"watch": "tsup --watch",
"clean": "del dist/*",
"start": "http-server test/__fixtures__ -p 1337 --cors",
"lint": "eslint src test",
"start": "http-server test/__fixtures__ -p 1337 --cors",
"test": "start-server-and-test start http://127.0.0.1:1337 test:coverage",
"test:coverage": "jest --coverage --bail",
"test:watch": "jest --watchAll --verbose",
"typecheck": "tsc --noEmit",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest watch",
"typecheck": "tsc -p test/tsconfig.json",
"size": "size-limit",
"validate": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build && pnpm run size",
"format": "prettier \"**/*.{js,jsx,json,yml,yaml,css,less,scss,ts,tsx,md,graphql,mdx}\" --write",
Expand Down Expand Up @@ -142,12 +138,12 @@
{
"name": "commonjs",
"path": "./dist/index.js",
"limit": "11 KB"
"limit": "10 KB"
},
{
"name": "esm",
"path": "./dist/index.mjs",
"limit": "9 KB"
"limit": "10 KB"
}
]
}
Loading

0 comments on commit af03d64

Please sign in to comment.