feat: add jest and initial tests for masking values

This commit is contained in:
Michael Zetterberg
2024-06-19 09:30:06 +02:00
committed by Christel Westerberg
parent d84efcbb0f
commit d28cbf10c7
9 changed files with 3462 additions and 62 deletions

View File

@@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"prebuild": "npm run update-dotenv && npm run lint",
"prebuild": "npm run update-dotenv && npm run lint && npm run test:unit",
"build": "next build",
"predev": "rm -rf .next",
"dev": "PORT=3000 NEXT_PUBLIC_PORT=3000 next dev",
@@ -20,7 +20,9 @@
"test:e2e:headless": "start-server-and-test test:setup http://127.0.0.1:3000/en/sponsoring \"cypress run --e2e\"",
"test:setup": "npm run build && npm run start",
"preinstall": "export $(cat .env.local | grep -v '^#' | xargs)",
"update-dotenv": "node update-dotenv.mjs"
"update-dotenv": "node update-dotenv.mjs",
"test:unit": "jest",
"test:unit:watch": "jest --watch"
},
"dependencies": {
"@contentstack/live-preview-utils": "^1.4.0",
@@ -57,6 +59,9 @@
},
"devDependencies": {
"@svgr/webpack": "^8.1.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@types/jest": "^29.5.12",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
@@ -67,11 +72,14 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-simple-import-sort": "^12.1.0",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jiti": "^1.21.0",
"lint-staged": "^15.2.2",
"netlify-plugin-cypress": "^2.2.1",
"prettier": "^3.2.5",
"start-server-and-test": "^2.0.3",
"ts-node": "^10.9.2",
"typescript": "^5",
"typescript-plugin-css-modules": "^5.1.0"
},