From c359c738fc3fddbdf5736f90b0ecb7b39cb246ef Mon Sep 17 00:00:00 2001 From: Vincent Germain Date: Fri, 2 Dec 2022 08:42:30 +0100 Subject: [PATCH] test: check homeDir with empty xdg_config_home --- packages/configuration-loader/src/__tests__/path-resolver.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/configuration-loader/src/__tests__/path-resolver.ts b/packages/configuration-loader/src/__tests__/path-resolver.ts index b3c5574cf..bd2c3df98 100644 --- a/packages/configuration-loader/src/__tests__/path-resolver.ts +++ b/packages/configuration-loader/src/__tests__/path-resolver.ts @@ -30,7 +30,9 @@ describe('getScwConfigurationDirectory', () => { }) it(`uses the home directory if any`, () => { + const oldXDG: string | undefined = updateEnv('XDG_CONFIG_HOME', '') expect(getScwConfigurationDirectory()?.length).toBeGreaterThan(0) + setOrDeleteEnv('XDG_CONFIG_HOME', oldXDG) }) })