Skip to content

Commit

Permalink
feat: test enabled flag
Browse files Browse the repository at this point in the history
  • Loading branch information
luifermoron committed Mar 21, 2024
1 parent f669719 commit a88f4b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ There are only two environment variables:
```sh
DATABASE_URL=[REPLACE_WITH_MONGODB_ATLAS_CREDENTIALS]
NEXTAUTH_SECRET=[REPLACE_WITH_YOUR_SOME_SECRET]
TEST_ENABLED=false
```

#### How to deploy in your own server:
Expand All @@ -78,7 +79,6 @@ NGINX_HOST=[REPLACE_WITH_YOUR_DOMAIN]
CERTBOT_EMAIL=[REPLACE_WITH_YOUR_EMAIL]
NEXTAUTH_SECRET=[REPLACE_WITH_YOUR_SOME_SECRET]
NEXTAUTH_URL=https://[REPLACE_WITH_YOUR_DOMAIN]

```

- Don't forget to configure your DNS.
Expand Down
2 changes: 1 addition & 1 deletion lib/drivers/database/seeder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export default async function executeSeeder(
} catch (error) {
console.log('error'); // eslint-disable-line no-console
console.log(error); // eslint-disable-line no-console
if (!TEST_ENABLED) process.exit(1);
if (!TEST_ENABLED && TEST_ENABLED === 'false') process.exit(1);
}
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "node cronconfig.js && node server.js",
"build": "next build",
"test": "TEST_ENABLED=true jest --verbose",
"start": "NODE_ENV=production next start",
"start": "NODE_ENV=production TEST_ENABLED=false next start",
"lint": "next lint",
"prettier": "prettier --write .",
"prepare": "husky install",
Expand Down

0 comments on commit a88f4b5

Please sign in to comment.