From 693fa51df51b9a50d64faf0863bdbc580ea88d72 Mon Sep 17 00:00:00 2001 From: Jon <66625200+Kyro3400@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:26:51 -0500 Subject: [PATCH] Update tests/records.test.js Co-authored-by: William Harrison <87287585+wdhdev@users.noreply.github.com> --- tests/records.test.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/records.test.js b/tests/records.test.js index aa58ecd0..2883d0e1 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -195,17 +195,10 @@ t("All files should have valid record values", (t) => { } } - // *: string - if (["CNAME", "URL"].includes(key)) { + // CNAME: string + if (key === "CNAME") { t.true(typeof value === "string", `${file}: Record value should be a string for ${key}`); - - if (key === "CNAME") { - t.regex(value, hostnameRegex, `${file}: Record value should be a valid hostname for ${key}`); - } - - if (key === "URL") { - t.notThrows(() => new URL(value), `${file}: Record value should be a valid URL for ${key}`); - } + t.regex(value, hostnameRegex, `${file}: Record value should be a valid hostname for ${key}`); } // *: {}[]