This commit is contained in:
Sasha 2023-02-16 21:24:28 +01:00
parent 426378f822
commit d01fc6fb5c
No known key found for this signature in database
4 changed files with 11294 additions and 52 deletions

33
jest.config.js Normal file
View File

@ -0,0 +1,33 @@
export default {
collectCoverageFrom: [
"**/**/*.{ts,tsx}",
"!**/**/*.test.{ts,tsx}",
"!**/src/types/**",
"!**/node_modules/**",
"!**/dist/**",
"!**/__tests__/**",
],
projects: [
{
clearMocks: true,
resetMocks: true,
restoreMocks: true,
rootDir: ".",
roots: ["<rootDir>/src"],
transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"],
displayName: {
name: "@waku/react",
color: "cyan",
},
testMatch: ["**/__tests__/**/*.(spec|test).ts?(x)"],
transform: {
"^.+\\.tsx?$": "@swc/jest",
},
testEnvironment: "jsdom",
},
],
watchPlugins: [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname",
],
};

5628
node_modules/.package-lock.json generated vendored

File diff suppressed because it is too large Load Diff

5675
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -49,7 +49,8 @@
"lint:fix": "npm run lint -- --fix",
"prettier:fix": "prettier --config .prettierrc --write \"**/*.{js,ts,tsx}\"",
"type": "tsc --noEmit",
"test": "echo 0;",
"test": "jest --config ./jest.config.js",
"test:coverage": "npm run test -- --coverage",
"prepublish": "npm run fix && npm run type && npm run test && npm run build"
},
"engines": {
@ -62,7 +63,11 @@
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.1",
"@swc/jest": "^0.2.24",
"@testing-library/jest-dom": "^5.16.5",
"@types/jest": "^29.4.0",
"@types/react": "^18.0.28",
"@types/testing-library__jest-dom": "^5.14.5",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@waku/interfaces": "^0.0.7",
"eslint": "^8.34.0",
@ -71,6 +76,9 @@
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"jest-watch-typeahead": "^2.2.2",
"prettier": "^2.8.4",
"rimraf": "^4.1.2",
"rollup-plugin-peer-deps-external": "^2.2.4",