chore: switch to jest for testing

This commit is contained in:
2024-02-21 00:04:36 +01:00
parent 3b540d0c48
commit e46f668ac8
47 changed files with 50329 additions and 839 deletions

View File

@@ -30,8 +30,8 @@
"ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov",
"ci:lint": "pnpm build && pnpm lint-staged",
"ci:test": "pnpm test -- --verbose",
"test": "NODE_OPTIONS='--import tsx' ava",
"save-test": "NODE_OPTIONS='--import tsx' ava --update-snapshots"
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
"save-test": "NODE_OPTIONS='--experimental-vm-modules' jest -u"
},
"files": [
"dist",
@@ -75,7 +75,6 @@
"@types/node": "^18.18.12",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"ava": "^5.3.1",
"chalk": "^5.3.0",
"del-cli": "^5.1.0",
"handlebars": "^4.7.8",
@@ -92,9 +91,17 @@
"puppeteer": "^21.5.2",
"mime": "^4.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"jest": "^29.7.0",
"@types/jest": "^29.5.12",
"ts-jest": "^29.1.2",
"@jest/globals": "^29.7.0"
},
"types": "./types/index.d.ts",
"jest": {
"preset":"ts-jest/presets/default-esm",
"setupFiles": ["./test/setup.js"]
},
"ava": {
"workerThreads": false,
"files": [