From 233b0ef45a4f6ffe0c4277687d4af55585d84408 Mon Sep 17 00:00:00 2001 From: Maxime Thirouin Date: Tue, 15 Nov 2016 12:46:37 +0100 Subject: [PATCH] Fix react rendering method used when clientScripts is disabled --- src/static/__tests__/index.js | 8 +------- .../__tests__/results/destination/index.html.js | 3 ++- .../results/destination/test-url/index.html.js | 3 ++- .../results/destination/test/index.html.js | 3 ++- src/static/__tests__/url-as-html.js | 15 +++++++-------- src/static/url-as-html.js | 9 ++++----- 6 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/static/__tests__/index.js b/src/static/__tests__/index.js index 414e4e6e1..19a31b7f4 100644 --- a/src/static/__tests__/index.js +++ b/src/static/__tests__/index.js @@ -25,9 +25,6 @@ test("don't break if there is nothing to transform", async (t) => { .then((files) => { t.is(files.length, 0) }) - .catch((error) => { - t.fail(error) - }) }) test("writeAllHTMLFiles", (t) => { @@ -48,14 +45,11 @@ test("writeAllHTMLFiles", (t) => { if (!expectedHTML[filename]) { throw new Error(filename + " is missing in expectedHTML results") } - t.deepEqual( + t.is( beautifyHTML(html), expectedHTML[filename](), ) }, forgetPageData: () => {}, }, true) - .catch((error) => { - t.fail(error) - }) }) diff --git a/src/static/__tests__/results/destination/index.html.js b/src/static/__tests__/results/destination/index.html.js index 7eb8f3faa..1f4b63c05 100644 --- a/src/static/__tests__/results/destination/index.html.js +++ b/src/static/__tests__/results/destination/index.html.js @@ -1,3 +1,4 @@ +/* eslint-disable max-len */ import htmlMetas from "../../../../_utils/html-metas" export default () => ( @@ -13,7 +14,7 @@ export default () => (
-

TestContainer

+

TestContainer