Skip to content

Commit 974b7d8

Browse files
committed
Results directory is not needed during unittesting
1 parent ed4fcb6 commit 974b7d8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/constants.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ export const getBCDDir = () =>
9595
* @throws An error if no valid mdn-bcd-results path detected
9696
*/
9797
export const getResultsDir = () =>
98-
get_dir(
99-
"RESULTS_DIR",
100-
"../mdn-bcd-results",
101-
"https://github.com/openwebdocs/mdn-bcd-results",
102-
try_results_dir,
103-
);
98+
process.env.NODE_ENV === "test"
99+
? ""
100+
: get_dir(
101+
"RESULTS_DIR",
102+
"../mdn-bcd-results",
103+
"https://github.com/openwebdocs/mdn-bcd-results",
104+
try_results_dir,
105+
);

0 commit comments

Comments
 (0)