Files
nobat724_front/package.json
T
hamed c316d22160 feat: add testing setup with Vitest and Testing Library
- Updated package.json to include Vitest and Testing Library dependencies and scripts for testing.
- Created a test suite for the ProvinceProvider context to validate cityId and province detection based on subdomains.
- Implemented unit tests for utility functions in helper/index.js, including phone number formatting and validation.
- Added tests for state information retrieval in lib/getStateInfo.js, ensuring correct city and state matching based on subdomains.
- Developed tests for appointment slot adaptation and availability checks in lib/appointmentSlots.js.
- Created tests for token storage functionality in lib/tokenStore.js.
- Implemented sanitization and JSON parsing tests in lib/sanitize.js.
- Added CASL ability tests in lib/ability.js to verify user access rights.
- Created tests for cookie management in lib/refreshCookie.js.
- Developed tests for patient user representation in lib/representationAdapters.js.
- Implemented client-side state information retrieval tests in lib/getStateInfoClient.js.
- Created tests for canonical URL generation in lib/getCanonicalUrl.js.
- Developed tests for clinic API service functions in services/clinicApi.js.
- Added request wrapper tests in services/response.js to ensure correct API interaction.
- Set up Vitest configuration in vitest.config.mjs for JSX support and alias resolution.
- Created setup and utility files for testing environment in test/setup.js and test/utils.jsx.
2026-06-28 23:25:46 +03:30

75 lines
2.0 KiB
JSON

{
"name": "nobat724",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "cross-env HOST=yazd-nobat.localhost PORT=3000 NODE_TLS_REJECT_UNAUTHORIZED=0 next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "vitest run",
"test:watch": "vitest",
"test:cov": "vitest run --coverage"
},
"dependencies": {
"@casl/ability": "^6.7.3",
"@casl/react": "^5.0.0",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@maptiler/sdk": "^3.9.0",
"@mui/icons-material": "^5.18.0",
"@mui/material": "^5.18.0",
"@mui/styled-engine": "^5.18.0",
"@mui/x-charts": "^7.29.1",
"@mui/x-date-pickers": "^7.29.4",
"@next/third-parties": "^15.5.7",
"aos": "^2.3.4",
"axios": "^1.13.2",
"date-fns": "^4.1.0",
"dayjs": "^1.11.19",
"html2canvas": "^1.4.1",
"i": "^0.3.7",
"isomorphic-dompurify": "^3.18.0",
"jalaali-js": "^1.2.8",
"jalali-moment": "^3.3.11",
"js-cookie": "^3.0.5",
"jspdf": "^3.0.4",
"moment-jalaali": "^0.10.4",
"next": "^15.5.7",
"next-themes": "^0.4.6",
"npm": "^11.7.0",
"postcss": "^8.5.6",
"qrcode": "^1.5.4",
"qrcode.react": "^4.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-easy-crop": "^5.5.6",
"react-google-map-picker": "^1.2.3",
"react-images-uploading": "^3.1.7",
"react-toastify": "^11.0.5",
"sharp": "^0.34.5",
"styled-components": "^6.1.19",
"stylis": "^4.3.6",
"stylis-plugin-rtl": "^2.1.1",
"swiper": "^12.0.3",
"tailwindcss": "^3.4.19",
"uninstall": "^0.0.0"
},
"devDependencies": {
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@vitejs/plugin-react": "^4.7.0",
"cross-env": "^10.1.0",
"jsdom": "^29.1.1",
"prettier": "^3.7.4",
"vitest": "^2.1.9"
},
"overrides": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
}