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.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/astro/test/react-component.test.js b/packages/astro/test/react-component.test.js
index aa196fdfb..48c985be1 100644
--- a/packages/astro/test/react-component.test.js
+++ b/packages/astro/test/react-component.test.js
@@ -35,7 +35,7 @@ React('No error creating the runtime', () => {
React('Can load React', async () => {
const result = await runtime.load('/');
- if (result.error) throw new Error(result.error);
+ assert.ok(!result.error, `build error: ${result.error}`);
const $ = doc(result.contents);
assert.equal($('#react-h2').text(), 'Hello world!');
@@ -45,7 +45,7 @@ React('Can load React', async () => {
React('Includes reactroot on hydrating components', async () => {
const result = await runtime.load('/');
- if (result.error) throw new Error(result.error);
+ assert.ok(!result.error, `build error: ${result.error}`);
const $ = doc(result.contents);
const div = $('#research');
@@ -66,7 +66,7 @@ React('Throws helpful error message on window SSR', async () => {
React('Can load Vue', async () => {
const result = await runtime.load('/');
- if (result.error) throw new Error(result.error);
+ assert.ok(!result.error, `build error: ${result.error}`);
const $ = doc(result.contents);
assert.equal($('#vue-h2').text(), 'Hasta la vista, baby');