summaryrefslogtreecommitdiff
path: root/packages/astro/test/react-component.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/test/react-component.test.js')
-rw-r--r--packages/astro/test/react-component.test.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/astro/test/react-component.test.js b/packages/astro/test/react-component.test.js
index 6f10b2914..6bfde0d25 100644
--- a/packages/astro/test/react-component.test.js
+++ b/packages/astro/test/react-component.test.js
@@ -43,6 +43,7 @@ React('Can load React', async () => {
assert.equal($('#arrow-fn-component').length, 1, 'Can use function components');
assert.equal($('#component-spread-props').length, 1, 'Can use spread for components');
assert.equal($('#component-spread-props').text(), 'Hello world!');
+ assert.equal($('.ts-component').length, 1, 'Can use TS components');
});
React('Includes reactroot on hydrating components', async () => {
@@ -74,6 +75,13 @@ React('Can load Vue', async () => {
assert.equal($('#vue-h2').text(), 'Hasta la vista, baby');
});
+React('Can use a pragma comment', async () => {
+ const result = await runtime.load('/pragma-comment');
+ assert.ok(!result.error, `build error: ${result.error}`);
+ const $ = doc(result.contents);
+ assert.equal($('.pragma-comment').length, 2, 'rendered the PragmaComment component.');
+});
+
React('uses the new JSX transform', async () => {
const result = await runtime.load('/');
assert.ok(!result.error, `build error: ${result.error}`);