summaryrefslogtreecommitdiff
path: root/test/react-component.test.js
diff options
context:
space:
mode:
authorGravatar Drew Powers <1369770+drwpow@users.noreply.github.com> 2021-04-09 14:23:25 -0600
committerGravatar GitHub <noreply@github.com> 2021-04-09 14:23:25 -0600
commite3ca67d6dc13e686889a771e0c710963bd5ec5fa (patch)
treefbb168dd33e34426151f9bb7d56a3659b3a021f3 /test/react-component.test.js
parent62924b31628a40adf0efd52c53086362070c4d8b (diff)
downloadastro-e3ca67d6dc13e686889a771e0c710963bd5ec5fa.tar.gz
astro-e3ca67d6dc13e686889a771e0c710963bd5ec5fa.tar.zst
astro-e3ca67d6dc13e686889a771e0c710963bd5ec5fa.zip
Use import specifier rather than filename (#71)
Diffstat (limited to 'test/react-component.test.js')
-rw-r--r--test/react-component.test.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/react-component.test.js b/test/react-component.test.js
index db3004be5..ea0cb51b7 100644
--- a/test/react-component.test.js
+++ b/test/react-component.test.js
@@ -32,13 +32,22 @@ React('No error creating the runtime', () => {
assert.equal(setupError, undefined);
});
-React('Can load page', async () => {
+React('Can load React', async () => {
const result = await runtime.load('/');
assert.equal(result.statusCode, 200);
const $ = doc(result.contents);
- assert.equal($('h2').text(), 'Hello world!');
+ assert.equal($('#react-h2').text(), 'Hello world!');
+});
+
+React('Can load Vue', async () => {
+ const result = await runtime.load('/');
+
+ assert.equal(result.statusCode, 200);
+
+ const $ = doc(result.contents);
+ assert.equal($('#vue-h2').text(), 'Hasta la vista, baby');
});
React.run();