Skip to content

Commit

Permalink
test: load env vars from env file
Browse files Browse the repository at this point in the history
  • Loading branch information
luanrv00 committed Sep 23, 2024
1 parent d2d3662 commit 46f36ed
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions docker/docker-compose.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ services:
e2e:
image: ivewatched-e2e
container_name: ivewatched-e2e
env_file:
- ../.env
volumes:
- ..:/app
- /app/node_modules
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"type": "commonjs",
"dependencies": {
"dotenv": "^16.4.5",
"knex": "^3.1.0",
"next": "14.2.7",
"pg": "^8.12.0",
Expand Down
5 changes: 3 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import {defineConfig, devices} from '@playwright/test'
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// import dotenv from 'dotenv';
// dotenv.config({ path: path.resolve(__dirname, '.env') });
import dotenv from 'dotenv'
import path from 'path'
dotenv.config({path: path.resolve(__dirname, '.env')})

/**
* See https://playwright.dev/docs/test-configuration.
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4305,6 +4305,11 @@ dot-case@^3.0.4:
no-case "^3.0.4"
tslib "^2.0.3"

dotenv@^16.4.5:
version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==

eastasianwidth@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
Expand Down

0 comments on commit 46f36ed

Please sign in to comment.