cut over to vitest: drop jest config, deps, setup, update CI

This commit is contained in:
Samuel Newman
2026-06-29 18:28:33 +03:00
parent b02d81661d
commit 56b29e21ee
16 changed files with 64 additions and 1346 deletions
+4 -61
View File
@@ -55,13 +55,10 @@
"build-embed": "cd bskyembed && pnpm build && pnpm build-snippet && cd .. && node ./scripts/post-embed-build.js",
"start": "expo start --dev-client",
"start:prod": "expo start --dev-client --no-dev --minify",
"test": "NODE_ENV=test jest --forceExit --testTimeout=20000 --bail",
"test-watch": "NODE_ENV=test jest --watchAll",
"test-ci": "NODE_ENV=test jest --ci --forceExit --reporters=default --reporters=jest-junit",
"test-coverage": "NODE_ENV=test jest --coverage",
"vitest": "vitest run",
"vitest-watch": "vitest",
"vitest-coverage": "vitest run --coverage",
"test": "vitest run",
"test-watch": "vitest",
"test-ci": "vitest run",
"test-coverage": "vitest run --coverage",
"lint": "eslint --cache --quiet src modules",
"lint-native": "swiftlint ./modules && ktlint ./modules",
"lint-native:fix": "swiftlint --fix ./modules && ktlint --format ./modules",
@@ -266,8 +263,6 @@
"@react-native/babel-preset": "0.81.5",
"@react-native/typescript-config": "^0.81.5",
"@sentry/webpack-plugin": "^3.2.2",
"@testing-library/react-native": "^13.2.0",
"@types/jest": "29.5.14",
"@types/lodash.chunk": "^4.2.7",
"@types/lodash.debounce": "^4.0.7",
"@types/lodash.shuffle": "^4.2.7",
@@ -277,7 +272,6 @@
"@typescript/native-preview": "^7.0.0-dev.20260428.1",
"@vitejs/plugin-react": "^6.0.3",
"@vitest/coverage-v8": "^4.1.9",
"babel-jest": "^29.7.0",
"babel-plugin-module-resolver": "^5.0.2",
"babel-plugin-react-compiler": "19.1.0-rc.3",
"babel-preset-expo": "~54.0.10",
@@ -296,9 +290,6 @@
"globals": "^17.0.0",
"husky": "^9.1.7",
"is-ci": "^3.0.1",
"jest": "^29.7.0",
"jest-expo": "~54.0.17",
"jest-junit": "^16.0.0",
"lint-staged": "^13.2.3",
"prettier": "^3.8.3",
"react-native-dotenv": "^3.4.11",
@@ -311,54 +302,6 @@
"vitest": "^4.1.9",
"webpack-bundle-analyzer": "^4.10.1"
},
"jest": {
"preset": "jest-expo/ios",
"setupFilesAfterEnv": [
"./jest/jestSetup.js"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"transform": {
"\\.[jt]sx?$": "babel-jest"
},
"moduleNameMapper": {
"^multiformats$": "<rootDir>/node_modules/multiformats/dist/src/index.js",
"^multiformats/cid$": "<rootDir>/node_modules/multiformats/dist/src/cid.js",
"^multiformats/bases/base32$": "<rootDir>/node_modules/multiformats/dist/src/bases/base32.js",
"^multiformats/hashes/digest$": "<rootDir>/node_modules/multiformats/dist/src/hashes/digest.js",
"^multiformats/hashes/sha2$": "<rootDir>/node_modules/multiformats/dist/src/hashes/sha2.js",
"^uint8arrays/from-string$": "<rootDir>/node_modules/uint8arrays/dist/src/from-string.js",
"^uint8arrays/to-string$": "<rootDir>/node_modules/uint8arrays/dist/src/to-string.js",
"^unicode-segmenter/grapheme$": "<rootDir>/node_modules/unicode-segmenter/grapheme.cjs",
"^await-lock$": "<rootDir>/node_modules/await-lock/build/AwaitLock.js"
},
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|nanoid|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|normalize-url|react-native-svg|@sentry/.*|sentry-expo|bcp-47-match|@atproto/.*|multiformats|uint8arrays|@ipld/.*|cborg|await-lock)"
],
"modulePathIgnorePatterns": [
"__tests__/.*/__mocks__",
"__e2e__/.*",
"bskylink/.*"
],
"coveragePathIgnorePatterns": [
"<rootDir>/node_modules/",
"<rootDir>/src/platform",
"<rootDir>/src/third-party",
"<rootDir>/src/view/com/util",
"<rootDir>/src/state/lib",
"<rootDir>/__tests__/test-utils.js"
],
"reporters": [
"default",
"jest-junit"
]
},
"browserslist": {
"production": [
">0.2%",