diff --git a/test/audits/canonical.test.js b/test/audits/canonical.test.js index 62462f2a..3b2dc7dd 100644 --- a/test/audits/canonical.test.js +++ b/test/audits/canonical.test.js @@ -98,7 +98,7 @@ describe('Canonical URL Tests', () => { describe('validateCanonicalTag', () => { it('should handle missing canonical tag', async () => { const url = 'http://example.com'; - const html = ''; + const html = 'test'; nock('http://example.com').get('/').reply(200, html); const result = await validateCanonicalTag(url, log); @@ -153,7 +153,7 @@ describe('Canonical URL Tests', () => { it('should handle invalid canonical URL correctly', async () => { const url = 'http://example.com'; - const html = ''; + const html = 'test'; nock(url).get('/').reply(200, html); const result = await validateCanonicalTag(url, log); @@ -168,7 +168,7 @@ describe('Canonical URL Tests', () => { it('should handle empty canonical tag', async () => { const url = 'http://example.com'; - const html = ''; + const html = 'test'; nock(url).get('/').reply(200, html); const result = await validateCanonicalTag(url, log); @@ -184,7 +184,7 @@ describe('Canonical URL Tests', () => { it('should handle multiple canonical tags', async () => { const url = 'http://example.com'; - const html = ''; + const html = 'test'; nock(url).get('/').reply(200, html); const result = await validateCanonicalTag(url, log); @@ -198,7 +198,7 @@ describe('Canonical URL Tests', () => { it('should fail if the canonical tag is not in the head section', async () => { const url = 'http://example.com'; - const html = ''; + const html = 'test'; nock(url).get('/').reply(200, html); const result = await validateCanonicalTag(url, log); @@ -356,7 +356,7 @@ describe('Canonical URL Tests', () => { it('should pass if the canonical URL points to itself', async () => { const url = 'http://example.com'; - const html = ``; + const html = `test`; nock(url).get('/').reply(200, html); const result = await validateCanonicalTag(url, log); @@ -396,7 +396,7 @@ describe('Canonical URL Tests', () => { it('should fail if the canonical URL does not point to itself', async () => { const url = 'http://example.com'; const canonicalUrl = 'http://example.com/other-page'; - const html = ``; + const html = `test`; nock(url).get('/').reply(200, html); const result = await validateCanonicalTag(url, log); @@ -486,9 +486,9 @@ describe('Canonical URL Tests', () => { const expectedCanonicalUrl = 'https://example.com/canonical-page'; const html = ` - + - + test

Test Page

@@ -534,7 +534,7 @@ describe('Canonical URL Tests', () => { describe('canonicalAuditRunner', () => { it('should run canonical audit successfully', async () => { const baseURL = 'http://example.com'; - const html = ``; + const html = `test`; nock('http://example.com').get('/page1').reply(200, html); nock(baseURL).get('/').reply(200, html);