Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create separate cypress env #23

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"start": "cross-env NODE_ENV=production node src/index.ts",
"dev": "cross-env NODE_ENV=development nodemon --files src/index.ts",
"start:test": "cross-env NODE_ENV=test ts-node --files src/index.ts",
"start:cypress-test": "cross-env NODE_ENV=cypress ts-node --files src/index.ts",
"start:dev": "cross-env NODE_ENV=development ts-node --files src/index.ts",
"docker:mongo": "docker-compose -f docker-compose.dev.yml up -d",
"lint": "eslint .",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const app = express();

if (NODE_ENV === 'development') {
mongodbConnect(config.DEV_MONGODB_URI!);
} else if (NODE_ENV === 'test') {
} else if (NODE_ENV === 'cypress') {
(async () => {
await testMongodb.connect();
})();
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"server:dev": "cd ../backend && npm run start:dev",
"server:test": "cd ../backend && npm run start:test",
"server:test": "cd ../backend && npm run start:cypress-test",
"docker:mongo": "cd ../backend && npm run docker:mongo",
"start:dev": "concurrently \"npm run docker:mongo\" \"npm run server:dev\" \"npm start\"",
"cypress:open": "cypress open",
Expand Down
Loading