0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

chore: Migrate astro-markdown-url.test.js to node:test (#10028)

This commit is contained in:
voxel!() 2024-02-08 02:25:35 -08:00 committed by GitHub
parent d67a23a3f0
commit 3d32724003
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,5 @@
import { expect } from 'chai';
import assert from 'node:assert/strict';
import { describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
@ -18,7 +19,7 @@ describe('Astro Markdown URL', () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
expect($('#url').attr('href')).to.equal(baseUrl + '/');
assert.strictEqual($('#url').attr('href'), baseUrl + '/');
});
it('trailingSlash: never', async () => {
@ -33,7 +34,7 @@ describe('Astro Markdown URL', () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
expect($('#url').attr('href')).to.equal(baseUrl);
assert.strictEqual($('#url').attr('href'), baseUrl);
});
it('trailingSlash: ignore', async () => {
@ -48,7 +49,7 @@ describe('Astro Markdown URL', () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
expect($('#url').attr('href')).to.equal(baseUrl);
assert.strictEqual($('#url').attr('href'), baseUrl);
});
});
@ -66,7 +67,7 @@ describe('Astro Markdown URL', () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
expect($('#url').attr('href')).to.equal(baseUrl + '/');
assert.strictEqual($('#url').attr('href'), baseUrl + '/');
});
it('trailingSlash: never', async () => {
@ -80,7 +81,7 @@ describe('Astro Markdown URL', () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
expect($('#url').attr('href')).to.equal(baseUrl);
assert.strictEqual($('#url').attr('href'), baseUrl);
});
it('trailingSlash: ignore', async () => {
@ -94,7 +95,7 @@ describe('Astro Markdown URL', () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
expect($('#url').attr('href')).to.equal(baseUrl);
assert.strictEqual($('#url').attr('href'), baseUrl);
});
});
});