From 8dbd380fcb7d7001d91bec7e6abd22af3ea0f3f1 Mon Sep 17 00:00:00 2001 From: Chapman Pendery Date: Mon, 4 Mar 2024 18:07:52 -0800 Subject: [PATCH] fix: config shouldn't be null if the file is empty Signed-off-by: Chapman Pendery --- src/config/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/config.ts b/src/config/config.ts index 983cb72..9df09c0 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -15,7 +15,7 @@ let loadedConfig: Required | undefined; export const loadConfig = async (): Promise> => { const userConfig: TestConfig = !fs.existsSync(configPath) ? {} - : (await import(`file://${configPath}`)).default; + : (await import(`file://${configPath}`)).default ?? {}; loadedConfig = { testMatch: userConfig.testMatch ?? "**/*.@(spec|test).?(c|m)[jt]s?(x)", expect: {