diff options
author | 2022-06-30 18:11:12 +0000 | |
---|---|---|
committer | 2022-06-30 18:11:12 +0000 | |
commit | af23bdd515645b7fa27e82f19229aebd1c0a7096 (patch) | |
tree | d7fedf0d808e4740bbe387bc17a518029364512e /packages/integrations/mdx/test/mdx-component.test.js | |
parent | 032ad1c047a62dd663067cc562537d16f2872aa7 (diff) | |
download | astro-af23bdd515645b7fa27e82f19229aebd1c0a7096.tar.gz astro-af23bdd515645b7fa27e82f19229aebd1c0a7096.tar.zst astro-af23bdd515645b7fa27e82f19229aebd1c0a7096.zip |
[ci] format
Diffstat (limited to 'packages/integrations/mdx/test/mdx-component.test.js')
-rw-r--r-- | packages/integrations/mdx/test/mdx-component.test.js | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/packages/integrations/mdx/test/mdx-component.test.js b/packages/integrations/mdx/test/mdx-component.test.js index 462e86e7b..1a610be05 100644 --- a/packages/integrations/mdx/test/mdx-component.test.js +++ b/packages/integrations/mdx/test/mdx-component.test.js @@ -1,18 +1,16 @@ import mdx from '@astrojs/mdx'; import { expect } from 'chai'; -import { parseHTML } from 'linkedom' +import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; describe('MDX Component', () => { let fixture; - + before(async () => { - fixture = await loadFixture({ + fixture = await loadFixture({ root: new URL('./fixtures/mdx-component/', import.meta.url), - integrations: [ - mdx() - ] + integrations: [mdx()], }); }); @@ -21,22 +19,21 @@ describe('MDX Component', () => { await fixture.build(); }); - it('works', async () => { const html = await fixture.readFile('/index.html'); const { document } = parseHTML(html); - + const h1 = document.querySelector('h1'); const foo = document.querySelector('#foo'); expect(h1.textContent).to.equal('Hello component!'); expect(foo.textContent).to.equal('bar'); }); - }) + }); describe('dev', () => { let devServer; - + before(async () => { devServer = await fixture.startDevServer(); }); @@ -52,12 +49,12 @@ describe('MDX Component', () => { const html = await res.text(); const { document } = parseHTML(html); - + const h1 = document.querySelector('h1'); const foo = document.querySelector('#foo'); expect(h1.textContent).to.equal('Hello component!'); expect(foo.textContent).to.equal('bar'); }); - }) -}) + }); +}); |