diff options
author | 2021-03-23 15:20:03 -0400 | |
---|---|---|
committer | 2021-03-23 15:20:03 -0400 | |
commit | ed85702581cad3f00729f920036560da439e1189 (patch) | |
tree | 96da9ef8e21d2dfaebc3c1c10120c0ffc6da802a /test/react-component.test.js | |
parent | e0353d50e77039bdf73d178a1d09dcd1aa0f59d0 (diff) | |
download | astro-ed85702581cad3f00729f920036560da439e1189.tar.gz astro-ed85702581cad3f00729f920036560da439e1189.tar.zst astro-ed85702581cad3f00729f920036560da439e1189.zip |
Allow HMX components in markdown (#19)
* Allow HMX components in markdown
This adds support for HMX components in markdown. The mechanism for importing is via frontmatter. We could do this differently (setup script maybe?) but since this was the easiest to implement I thought it was a good first-pass option.
* Remove node-fetch from snowpack config
* Assert that the runtime is created successfully
* Add back in the micromark extension for encoding entities
* Encode both codeTextData and codeFlowValue
* Install snowpack app's deps
Diffstat (limited to 'test/react-component.test.js')
-rw-r--r-- | test/react-component.test.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/react-component.test.js b/test/react-component.test.js index 0b6273922..d901c62b0 100644 --- a/test/react-component.test.js +++ b/test/react-component.test.js @@ -6,7 +6,7 @@ import { doc } from './test-utils.js'; const React = suite('React Components'); -let runtime; +let runtime, setupError; React.before(async () => { const astroConfig = await loadConfig(new URL('./fixtures/react-component', import.meta.url).pathname); @@ -20,7 +20,7 @@ React.before(async () => { runtime = await createRuntime(astroConfig, logging); } catch(err) { console.error(err); - throw err; + setupError = err; } }); @@ -28,6 +28,10 @@ React.after(async () => { await runtime.shutdown(); }); +React('No error creating the runtime', () => { + assert.equal(setupError, undefined); +}); + React('Can load hmx page', async () => { const result = await runtime.load('/'); |