summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/mdx-plus-react.test.js
diff options
context:
space:
mode:
authorGravatar Alex Nguyen <dev@alexnguyen.co.nz> 2024-01-31 21:37:34 +1300
committerGravatar GitHub <noreply@github.com> 2024-01-31 08:37:34 +0000
commit11d5e52710def26b4fd8dcff503c9ff4b87f6f5a (patch)
treeb874374356553bd2e2023334aa540e4437fffc69 /packages/integrations/mdx/test/mdx-plus-react.test.js
parent6dbafb8f5f34d54124a564f70b1cc3d152855bf2 (diff)
downloadastro-11d5e52710def26b4fd8dcff503c9ff4b87f6f5a.tar.gz
astro-11d5e52710def26b4fd8dcff503c9ff4b87f6f5a.tar.zst
astro-11d5e52710def26b4fd8dcff503c9ff4b87f6f5a.zip
migrate MDX tests (#9894)
Diffstat (limited to 'packages/integrations/mdx/test/mdx-plus-react.test.js')
-rw-r--r--packages/integrations/mdx/test/mdx-plus-react.test.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/integrations/mdx/test/mdx-plus-react.test.js b/packages/integrations/mdx/test/mdx-plus-react.test.js
index d0f6095c1..eb5955282 100644
--- a/packages/integrations/mdx/test/mdx-plus-react.test.js
+++ b/packages/integrations/mdx/test/mdx-plus-react.test.js
@@ -1,4 +1,5 @@
-import { expect } from 'chai';
+import { describe, it, before } from 'node:test';
+import * as assert from 'node:assert/strict';
import { parseHTML } from 'linkedom';
import { loadFixture } from '../../../astro/test/test-utils.js';
@@ -32,18 +33,18 @@ describe('MDX and React', () => {
const p = document.querySelector('p');
- expect(p.textContent).to.equal('Hello world');
+ assert.equal(p.textContent, 'Hello world');
});
it('mdx renders fine', async () => {
const html = await fixture.readFile('/post/index.html');
const { document } = parseHTML(html);
const h = document.querySelector('#testing');
- expect(h.textContent).to.equal('Testing');
+ assert.equal(h.textContent, 'Testing');
});
it('does not get a invalid hook call warning', () => {
const errors = unhook();
- expect(errors).to.have.a.lengthOf(0);
+ assert.equal(errors.length === 0, true);
});
});