From 5299a26dc549424645f029ee854bba5508cf012d Mon Sep 17 00:00:00 2001 From: Jon <66625200+Kyro3400@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:12:15 -0500 Subject: [PATCH] Update records.test.js --- tests/records.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/records.test.js b/tests/records.test.js index 12f8be3e..515a06f0 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -2,7 +2,7 @@ const t = require("ava"); const fs = require("fs-extra"); const path = require("path"); -const validRecordTypes = ["A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SRV", "TXT"]; +const validRecordTypes = ["A", "AAAA", "CAA", "CNAME", "MX", "NS", "SPF", "SRV", "TXT"]; const hostnameRegex = /^(?=.{1,253}$)(?:(?:[_a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)\.)+[a-zA-Z]{2,63}$/; const ipv4Regex = /^(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}$/; @@ -267,8 +267,8 @@ t("All files should have valid record values", (t) => { } } - // TXT: string | string[] - if (key === "TXT") { + // TXT|SPF: string | string[] + if (["SPF", "TXT"].includes(key)) { if (Array.isArray(value)) { value.forEach((record) => { t.true(