diff options
Diffstat (limited to 'packages/integrations/sitemap/test/trailing-slash.test.js')
-rw-r--r-- | packages/integrations/sitemap/test/trailing-slash.test.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/packages/integrations/sitemap/test/trailing-slash.test.js b/packages/integrations/sitemap/test/trailing-slash.test.js index d51ed2020..a393fb9f1 100644 --- a/packages/integrations/sitemap/test/trailing-slash.test.js +++ b/packages/integrations/sitemap/test/trailing-slash.test.js @@ -1,6 +1,5 @@ import { loadFixture, readXML } from './test-utils.js'; -import * as assert from 'node:assert/strict'; -import { describe, it, before } from 'node:test'; +import { expect } from 'chai'; describe('Trailing slash', () => { /** @type {import('./test-utils').Fixture} */ @@ -22,7 +21,7 @@ describe('Trailing slash', () => { it('URLs end with trailing slash', async () => { const data = await readXML(fixture.readFile('/sitemap-0.xml')); const urls = data.urlset.url; - assert.equal(urls[0].loc[0], 'http://example.com/one/'); + expect(urls[0].loc[0]).to.equal('http://example.com/one/'); }); }); @@ -41,7 +40,7 @@ describe('Trailing slash', () => { it('URLs do not end with trailing slash', async () => { const data = await readXML(fixture.readFile('/sitemap-0.xml')); const urls = data.urlset.url; - assert.equal(urls[0].loc[0], 'http://example.com/one'); + expect(urls[0].loc[0]).to.equal('http://example.com/one'); }); }); }); @@ -58,7 +57,7 @@ describe('Trailing slash', () => { it('URLs do no end with trailing slash', async () => { const data = await readXML(fixture.readFile('/sitemap-0.xml')); const urls = data.urlset.url; - assert.equal(urls[0].loc[0], 'http://example.com/one'); + expect(urls[0].loc[0]).to.equal('http://example.com/one'); }); describe('with base path', () => { before(async () => { @@ -73,7 +72,7 @@ describe('Trailing slash', () => { it('URLs do not end with trailing slash', async () => { const data = await readXML(fixture.readFile('/sitemap-0.xml')); const urls = data.urlset.url; - assert.equal(urls[0].loc[0], 'http://example.com/base/one'); + expect(urls[0].loc[0]).to.equal('http://example.com/base/one'); }); }); }); @@ -90,7 +89,7 @@ describe('Trailing slash', () => { it('URLs end with trailing slash', async () => { const data = await readXML(fixture.readFile('/sitemap-0.xml')); const urls = data.urlset.url; - assert.equal(urls[0].loc[0], 'http://example.com/one/'); + expect(urls[0].loc[0]).to.equal('http://example.com/one/'); }); describe('with base path', () => { before(async () => { @@ -105,7 +104,7 @@ describe('Trailing slash', () => { it('URLs end with trailing slash', async () => { const data = await readXML(fixture.readFile('/sitemap-0.xml')); const urls = data.urlset.url; - assert.equal(urls[0].loc[0], 'http://example.com/base/one/'); + expect(urls[0].loc[0]).to.equal('http://example.com/base/one/'); }); }); }); |