diff options
Diffstat (limited to 'packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js')
-rw-r--r-- | packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js b/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js index eab2c61b0..c9f846a3a 100644 --- a/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js +++ b/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js @@ -1,6 +1,7 @@ import mdx from '@astrojs/mdx'; -import { expect } from 'chai'; +import { describe, it } from 'node:test'; +import * as assert from 'node:assert/strict'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; @@ -21,8 +22,9 @@ describe('MDX with Astro Markdown remark-rehype config', () => { const html = await fixture.readFile('/index.html'); const { document } = parseHTML(html); - expect(document.querySelector('#footnote-label').textContent).to.equal('Catatan kaki'); - expect(document.querySelector('.data-footnote-backref').getAttribute('aria-label')).to.equal( + assert.equal(document.querySelector('#footnote-label').textContent, 'Catatan kaki'); + assert.equal( + document.querySelector('.data-footnote-backref').getAttribute('aria-label'), 'Kembali ke konten' ); }); @@ -49,8 +51,9 @@ describe('MDX with Astro Markdown remark-rehype config', () => { const html = await fixture.readFile('/index.html'); const { document } = parseHTML(html); - expect(document.querySelector('#footnote-label').textContent).to.equal('Catatan kaki'); - expect(document.querySelector('.data-footnote-backref').getAttribute('aria-label')).to.equal( + assert.equal(document.querySelector('#footnote-label').textContent, 'Catatan kaki'); + assert.equal( + document.querySelector('.data-footnote-backref').getAttribute('aria-label'), 'Kembali ke konten' ); }); @@ -77,8 +80,9 @@ describe('MDX with Astro Markdown remark-rehype config', () => { const html = await fixture.readFile('/index.html'); const { document } = parseHTML(html); - expect(document.querySelector('#footnote-label').textContent).to.equal('Catatan kaki'); - expect(document.querySelector('.data-footnote-backref').getAttribute('aria-label')).to.equal( + assert.equal(document.querySelector('#footnote-label').textContent, 'Catatan kaki'); + assert.equal( + document.querySelector('.data-footnote-backref').getAttribute('aria-label'), 'Back to reference 1' ); }); |