From 9fd02ef89903b13cdb7bb3f8b5921ba4deaebc16 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:27:33 +0200 Subject: [PATCH 1/2] refactor Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com> --- spec/helper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/helper.js b/spec/helper.js index afb1a7888f..bd17bb9fbd 100644 --- a/spec/helper.js +++ b/spec/helper.js @@ -432,10 +432,10 @@ var testExclusionList = []; try { // Fetch test exclusion list testExclusionList = require('./testExclusionList.json'); - console.log("testExclusionList.json Found") + console.log(`Using test exclusion list with ${testExclusionList.length} entries`); } catch(error) { - if(error.code === "MODULE_NOT_FOUND") { - // Even though it says require, it's not. Don't fail + if(error.code !== 'MODULE_NOT_FOUND') { + throw error; } } From 953aecfadbddd6834d9494e6d309742a075adbab Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:29:19 +0200 Subject: [PATCH 2/2] refactor Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com> --- spec/helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/helper.js b/spec/helper.js index bd17bb9fbd..ab7b45f843 100644 --- a/spec/helper.js +++ b/spec/helper.js @@ -428,7 +428,7 @@ global.it_exclude_dbs = excluded => { } }; -var testExclusionList = []; +let testExclusionList = []; try { // Fetch test exclusion list testExclusionList = require('./testExclusionList.json'); @@ -439,7 +439,7 @@ try { } } -// Bypass test if Test UUID found in testExclusionList +// Disable test if its UUID is found in testExclusionList global.it_id = id => { if (testExclusionList.includes(id)) { return xit;