Skip to content

Commit

Permalink
feat: adding info log
Browse files Browse the repository at this point in the history
  • Loading branch information
dipratap committed Sep 2, 2024
1 parent 7152b50 commit 84d6b55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/metatags/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ async function fetchAndProcessPageObject(s3Client, bucketName, key, prefix, log)
return null;
}
const pageUrl = key.slice(prefix.length - 1).replace('scrape.json', ''); // Remove the prefix and .json suffix
log.info(`Scraped tags for ${pageUrl} : ${JSON.stringify(object.scrapeResult.tags)}`);
return {
[pageUrl]: {
title: object.scrapeResult.tags.title,
Expand Down
4 changes: 2 additions & 2 deletions test/audits/metatags.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ describe('Meta Tags', () => {
],
}));
expect(addAuditStub.calledOnce).to.be.true;
expect(logStub.info.callCount).to.equal(4);
expect(logStub.info.callCount).to.equal(6);
});

it('should process site tags and perform SEO checks for pages with invalid H1s', async () => {
Expand Down Expand Up @@ -454,7 +454,7 @@ describe('Meta Tags', () => {
],
}));
expect(addAuditStub.calledOnce).to.be.true;
expect(logStub.info.callCount).to.equal(4);
expect(logStub.info.callCount).to.equal(6);
});

it('should handle errors and return internalServerError', async () => {
Expand Down

0 comments on commit 84d6b55

Please sign in to comment.