Skip to content

Commit

Permalink
feat: temp change for site not live
Browse files Browse the repository at this point in the history
  • Loading branch information
dipratap committed Sep 10, 2024
1 parent f17d565 commit fc6a230
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/metatags/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
14 changes: 7 additions & 7 deletions test/audits/metatags.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit fc6a230

Please sign in to comment.