From 87dc0d3c9b18cdbbcb4b3eda7de1cd1163cbf9c5 Mon Sep 17 00:00:00 2001 From: Dominic Griesel Date: Tue, 5 Nov 2024 12:38:51 +0100 Subject: [PATCH] fix: tests --- packages/config/src/ConfigManager.test.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/config/src/ConfigManager.test.ts b/packages/config/src/ConfigManager.test.ts index 08e9adbf5dbc..5f83b4a6900c 100644 --- a/packages/config/src/ConfigManager.test.ts +++ b/packages/config/src/ConfigManager.test.ts @@ -51,8 +51,7 @@ test.sequential( const { tempDir, logger } = context; const configDir = path.join(tempDir, "extconfig"); - process.env.ZWAVEJS_EXTERNAL_CONFIG = configDir; - await syncExternalConfigDir(logger); + await syncExternalConfigDir(configDir, logger); expect(await pathExists(configDir)).toBe(true); expect( @@ -68,7 +67,6 @@ test.sequential( const { tempDir, logger } = context; const configDir = path.join(tempDir, "extconfig"); - process.env.ZWAVEJS_EXTERNAL_CONFIG = configDir; const otherVersion = semver.inc(ownVersion, "major"); await fs.mkdir(configDir, { recursive: true }); @@ -78,7 +76,7 @@ test.sequential( "utf8", ); - await syncExternalConfigDir(logger); + await syncExternalConfigDir(configDir, logger); expect(await pathExists(configDir)).toBe(true); @@ -95,7 +93,6 @@ test.sequential( const { tempDir, logger } = context; const configDir = path.join(tempDir, "extconfig"); - process.env.ZWAVEJS_EXTERNAL_CONFIG = configDir; const otherVersion = semver.inc(ownVersion, "prerelease")!; await fs.mkdir(configDir, { recursive: true }); @@ -105,7 +102,7 @@ test.sequential( "utf8", ); - await syncExternalConfigDir(logger); + await syncExternalConfigDir(configDir, logger); expect(await pathExists(configDir)).toBe(true);