chore: Jest Testing structure (#2707)
* deps: add jest deps * chore: mock * feat: use mocinggoose * feat: jest * chore: remove babel.config.js
Showing
fastgpt@4.0
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
projects/app/jest.config.js
0 → 100644
| ... | @@ -6,7 +6,8 @@ | ... | @@ -6,7 +6,8 @@ |
| "dev": "next dev", | "dev": "next dev", | ||
| "build": "next build", | "build": "next build", | ||
| "start": "next start", | "start": "next start", | ||
| "lint": "next lint" | "lint": "next lint", | ||
| "test": "jest" | |||
| }, | }, | ||
| "dependencies": { | "dependencies": { | ||
| "@bany/curl-to-json": "^1.2.8", | "@bany/curl-to-json": "^1.2.8", | ||
| ... | @@ -25,6 +26,7 @@ | ... | @@ -25,6 +26,7 @@ |
| "@fortaine/fetch-event-source": "^3.0.6", | "@fortaine/fetch-event-source": "^3.0.6", | ||
| "@node-rs/jieba": "1.10.0", | "@node-rs/jieba": "1.10.0", | ||
| "@tanstack/react-query": "^4.24.10", | "@tanstack/react-query": "^4.24.10", | ||
| "@types/jest": "^29.5.2", | |||
| "@types/nprogress": "^0.2.0", | "@types/nprogress": "^0.2.0", | ||
| "ahooks": "^3.7.11", | "ahooks": "^3.7.11", | ||
| "axios": "^1.5.1", | "axios": "^1.5.1", | ||
| ... | @@ -37,6 +39,7 @@ | ... | @@ -37,6 +39,7 @@ |
| "hyperdown": "^2.4.29", | "hyperdown": "^2.4.29", | ||
| "i18next": "23.11.5", | "i18next": "23.11.5", | ||
| "immer": "^9.0.19", | "immer": "^9.0.19", | ||
| "jest": "^29.5.0", | |||
| "js-yaml": "^4.1.0", | "js-yaml": "^4.1.0", | ||
| "json5": "^2.2.3", | "json5": "^2.2.3", | ||
| "jsonwebtoken": "^9.0.2", | "jsonwebtoken": "^9.0.2", | ||
| ... | @@ -62,10 +65,12 @@ | ... | @@ -62,10 +65,12 @@ |
| "remark-math": "^6.0.0", | "remark-math": "^6.0.0", | ||
| "request-ip": "^3.3.0", | "request-ip": "^3.3.0", | ||
| "sass": "^1.58.3", | "sass": "^1.58.3", | ||
| "ts-jest": "^29.1.0", | |||
| "use-context-selector": "^1.4.4", | "use-context-selector": "^1.4.4", | ||
| "zustand": "^4.3.5" | "zustand": "^4.3.5" | ||
| }, | }, | ||
| "devDependencies": { | "devDependencies": { | ||
| "@shelf/jest-mongodb": "^4.3.2", | |||
| "@svgr/webpack": "^6.5.1", | "@svgr/webpack": "^6.5.1", | ||
| "@types/formidable": "^2.0.5", | "@types/formidable": "^2.0.5", | ||
| "@types/js-yaml": "^4.0.9", | "@types/js-yaml": "^4.0.9", | ||
| ... | @@ -78,6 +83,8 @@ | ... | @@ -78,6 +83,8 @@ |
| "@types/request-ip": "^0.0.37", | "@types/request-ip": "^0.0.37", | ||
| "eslint": "8.56.0", | "eslint": "8.56.0", | ||
| "eslint-config-next": "14.2.3", | "eslint-config-next": "14.2.3", | ||
| "mockingoose": "^2.16.2", | |||
| "mongodb-memory-server": "^10.0.0", | |||
| "nextjs-node-loader": "^1.1.5", | "nextjs-node-loader": "^1.1.5", | ||
| "typescript": "^5.1.3" | "typescript": "^5.1.3" | ||
| } | } | ||
| ... | ... |
projects/app/src/pages/api/__mocks__/base.ts
0 → 100644
projects/app/src/test/utils.ts
0 → 100644
scripts/openapi/index.js
0 → 100644
scripts/openapi/openapi.js
0 → 100644
scripts/openapi/openapi.json
0 → 100644
This diff is collapsed.
Click to expand it.
scripts/openapi/openapi.out
0 → 100644
This diff is collapsed.
Click to expand it.
scripts/openapi/utils.js
0 → 100644
Please
register
or
sign in
to comment