summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/mdx-math.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/mdx/test/mdx-math.test.js')
-rw-r--r--packages/integrations/mdx/test/mdx-math.test.js19
1 files changed, 14 insertions, 5 deletions
diff --git a/packages/integrations/mdx/test/mdx-math.test.js b/packages/integrations/mdx/test/mdx-math.test.js
index 52ee94a46..cc6169c55 100644
--- a/packages/integrations/mdx/test/mdx-math.test.js
+++ b/packages/integrations/mdx/test/mdx-math.test.js
@@ -1,5 +1,6 @@
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';
import remarkMath from 'remark-math';
@@ -25,10 +26,14 @@ describe('MDX math', () => {
const { document } = parseHTML(html);
const mjxContainer = document.querySelector('mjx-container[jax="SVG"]');
- expect(mjxContainer).to.not.be.null;
+ assert.notEqual(mjxContainer, null);
const mjxStyle = document.querySelector('style').innerHTML;
- expect(mjxStyle).to.include('mjx-container[jax="SVG"]', 'style should not be html-escaped');
+ assert.equal(
+ mjxStyle.includes('mjx-container[jax="SVG"]'),
+ true,
+ 'style should not be html-escaped'
+ );
});
it('works with chtml', async () => {
@@ -55,10 +60,14 @@ describe('MDX math', () => {
const { document } = parseHTML(html);
const mjxContainer = document.querySelector('mjx-container[jax="CHTML"]');
- expect(mjxContainer).to.not.be.null;
+ assert.notEqual(mjxContainer, null);
const mjxStyle = document.querySelector('style').innerHTML;
- expect(mjxStyle).to.include('mjx-container[jax="CHTML"]', 'style should not be html-escaped');
+ assert.equal(
+ mjxStyle.includes('mjx-container[jax="CHTML"]'),
+ true,
+ 'style should not be html-escaped'
+ );
});
});
});