From fc6a23045fe5b0bbdad26a39bc2910bec3f765b2 Mon Sep 17 00:00:00 2001 From: Divyansh Pratap Date: Tue, 10 Sep 2024 16:53:11 +0530 Subject: [PATCH] feat: temp change for site not live --- src/metatags/handler.js | 8 ++++---- test/audits/metatags.test.js | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/metatags/handler.js b/src/metatags/handler.js index fb79eaf7..d6661a14 100644 --- a/src/metatags/handler.js +++ b/src/metatags/handler.js @@ -46,10 +46,10 @@ export default async function auditMetaTags(message, context) { if (!site) { return notFound('Site not found'); } - if (!site.isLive()) { - log.info(`Site ${siteId} is not live`); - return ok(); - } + // if (!site.isLive()) { + // log.info(`Site ${siteId} is not live`); + // return ok(); + // } const configuration = await dataAccess.getConfiguration(); if (!configuration.isHandlerEnabledForSite(type, site)) { log.info(`Audit type ${type} disabled for site ${siteId}`); diff --git a/test/audits/metatags.test.js b/test/audits/metatags.test.js index 97ae27a3..4a49c65b 100644 --- a/test/audits/metatags.test.js +++ b/test/audits/metatags.test.js @@ -198,13 +198,13 @@ describe('Meta Tags', () => { expect(logStub.info.calledOnce).to.be.true; }); - it('should return ok if site is not live', async () => { - dataAccessStub.getSiteByID.resolves({ isLive: sinon.stub().returns(false) }); - - const result = await auditMetaTags(message, context); - expect(JSON.stringify(result)).to.equal(JSON.stringify(ok())); - expect(logStub.info.calledTwice).to.be.true; - }); + // it('should return ok if site is not live', async () => { + // dataAccessStub.getSiteByID.resolves({ isLive: sinon.stub().returns(false) }); + // + // const result = await auditMetaTags(message, context); + // expect(JSON.stringify(result)).to.equal(JSON.stringify(ok())); + // expect(logStub.info.calledTwice).to.be.true; + // }); it('should return ok if audit type is disabled for site', async () => { dataAccessStub.getConfiguration.resolves({