summaryrefslogtreecommitdiff
path: root/packages/integrations/sitemap/test/trailing-slash.test.js
diff options
context:
space:
mode:
authorGravatar Emanuele Stoppa <my.burning@gmail.com> 2024-01-31 09:47:21 +0000
committerGravatar GitHub <noreply@github.com> 2024-01-31 09:47:21 +0000
commit1c4a263d8f044d675b3338b77b1470af93e32ca3 (patch)
tree6d0d0705fb753a8eec12b245b7df891853cedc2b /packages/integrations/sitemap/test/trailing-slash.test.js
parent11d5e52710def26b4fd8dcff503c9ff4b87f6f5a (diff)
downloadastro-1c4a263d8f044d675b3338b77b1470af93e32ca3.tar.gz
astro-1c4a263d8f044d675b3338b77b1470af93e32ca3.tar.zst
astro-1c4a263d8f044d675b3338b77b1470af93e32ca3.zip
Revert "chore(@astrojs/integrations/sitemap): use Node.js for testing (#9891)" (#9900)
This reverts commit 82de54979e90f7f46b832cf5ae88fcc5fed43568.
Diffstat (limited to 'packages/integrations/sitemap/test/trailing-slash.test.js')
-rw-r--r--packages/integrations/sitemap/test/trailing-slash.test.js15
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/');
});
});
});