From 786778c7cff5673674775e5469a9e62da1990ae4 Mon Sep 17 00:00:00 2001 From: Kira Date: Mon, 18 Sep 2023 12:02:47 -0700 Subject: [PATCH] Enabling dotenv to be done w/in globalSetup --- globalSetup.js | 5 +++++ playwright.config.js | 1 + 2 files changed, 6 insertions(+) create mode 100644 globalSetup.js diff --git a/globalSetup.js b/globalSetup.js new file mode 100644 index 0000000..63d400a --- /dev/null +++ b/globalSetup.js @@ -0,0 +1,5 @@ +import * as dotenv from "dotenv" + +export default () => { + dotenv.config() +} \ No newline at end of file diff --git a/playwright.config.js b/playwright.config.js index 903bba3..80e685a 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -23,6 +23,7 @@ const config = { */ timeout: 5000 }, + globalSetup: require.resolve("./globalSetup.js"), /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */