From ada0a992e52adf02cc84d09c6cb0d8d9c2c4708e Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 9 Sep 2021 15:21:52 +0530 Subject: [PATCH] validations: adds _dmarc as an exception --- tests/domains.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/domains.test.js b/tests/domains.test.js index 44c2a5422..9819be63b 100644 --- a/tests/domains.test.js +++ b/tests/domains.test.js @@ -4,6 +4,8 @@ const { getDomains } = require('../utils/get-domain'); const { validateDomainData } = require('../utils/validations'); const { DOMAINS_PATH } = require('../utils/constants'); +const NAME_EXCEPTIONS = ['_psl', '_dmarc']; + describe('Domains', () => { it('should all be json', async () => { const files = await fs.promises.readdir(DOMAINS_PATH, {}); @@ -12,7 +14,7 @@ describe('Domains', () => { it('should be valid', (done) => { getDomains() - .then(R.reject(R.propEq('name', '_psl'))) + .then(R.reject(R.propSatisfies(R.includes(R.__, NAME_EXCEPTIONS), 'name'))) .then(R.map(data => { const { errors } = validateDomainData(data); if (errors.length) {