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:
parent
d67a23a3f0
commit
3d32724003
1 changed files with 8 additions and 7 deletions
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue