From 844da3f1fecb8e3e7040d35202ed11a5646c8534 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Mon, 11 Dec 2017 16:18:28 +0800 Subject: [PATCH] test: js/jsx page --- test/basic.ssr.test.js | 5 +++++ test/fixtures/basic/pages/jsx.js | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 test/fixtures/basic/pages/jsx.js diff --git a/test/basic.ssr.test.js b/test/basic.ssr.test.js index 3692ac4ede..a8abb58413 100755 --- a/test/basic.ssr.test.js +++ b/test/basic.ssr.test.js @@ -245,6 +245,11 @@ test('/router-guard', async t => { t.false(html.includes('Router Guard')) }) +test('/jsx', async t => { + const { html } = await nuxt.renderRoute('/jsx') + t.true(html.includes('

JSX Page

')) +}) + // Close server and ask nuxt to stop listening to file changes test.after('Closing server and nuxt.js', t => { nuxt.close() diff --git a/test/fixtures/basic/pages/jsx.js b/test/fixtures/basic/pages/jsx.js new file mode 100644 index 0000000000..88923dce9d --- /dev/null +++ b/test/fixtures/basic/pages/jsx.js @@ -0,0 +1,7 @@ +export default { + render() { + return
+

JSX Page

+
+ } +}