From 69ec3270f2ca5a6b8f7613eb2abb845551514c22 Mon Sep 17 00:00:00 2001 From: Tweak Date: Mon, 21 Nov 2022 21:55:06 -0700 Subject: [PATCH] Update json.test.js --- tests/json.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/json.test.js b/tests/json.test.js index e4f1942..9e7de92 100644 --- a/tests/json.test.js +++ b/tests/json.test.js @@ -3,8 +3,11 @@ const getJSON = require('../utils/getJSON.js'); const checkInfo = require('../utils/checkInfo.js'); const checkRecords = require('../utils/checkRecords.js'); const data = getJSON(process.env.FILES); + core.setOutput('infoMessage', "Could not validate info."); core.setOutput('recordMessage', "Could not validate records."); +core.setOutput('jsonData', data) + test('check if json file has required info', async () => { const passed = await checkInfo(data); let infoMessage = passed === true ? "Valid Info Provided." : passed === "unknown" ? "Error Verifying Email.\nA maintainer will have to manually verify your email.\nReason:" : "Invalid Info Provided.\nPlease check your provided info.\nReason:"; @@ -14,7 +17,7 @@ test('check if json file has required info', async () => { test('check if json file follows format', () => { const passed = checkRecords(data); - let recordMessage = passed === true ? "Valid Records Provided." : "Invalid Records Provided.\nPlease check your provided records.\nThey should only be of type `CNAME` or `A`, and should follow their respective formats."; + let recordMessage = passed === true ? "Valid Records Provided." : "Invalid Records Provided.\nPlease check your provided records.\nThey should only be of type `CNAME` or `A` or `TXT`, and should follow their respective formats."; core.setOutput('recordMessage', recordMessage); expect(passed).toBe(true); });