diff --git a/test/integration/client-navigation/pages/head-duplicate-default-keys.js b/test/integration/client-navigation/pages/head-duplicate-default-keys.js
index 9f81993679fa0..b3848d0559e8d 100644
--- a/test/integration/client-navigation/pages/head-duplicate-default-keys.js
+++ b/test/integration/client-navigation/pages/head-duplicate-default-keys.js
@@ -6,17 +6,14 @@ export default () => (
{/* this will not render */}
- {/* this will override the default (same key as the default) */}
-
-
{/* this will not render */}
-
- {/* this will override the default (same key as the default) */}
-
+
+ {/* this will render instead of the default */}
+
+
+
+ {/* this will override the the above */}
+
Meta tags with same keys as default get deduped
diff --git a/test/integration/client-navigation/test/rendering.js b/test/integration/client-navigation/test/rendering.js
index 8143c93a1ba22..b7679fbb45796 100644
--- a/test/integration/client-navigation/test/rendering.js
+++ b/test/integration/client-navigation/test/rendering.js
@@ -90,12 +90,12 @@ export default function(render, fetch) {
test('header helper dedupes tags with the same key as the default', async () => {
const html = await render('/head-duplicate-default-keys')
- expect(html).toContain('')
- expect(html).not.toContain('')
- expect(html).toContain(
- ''
- )
- expect(html).not.toContain('')
+ // Expect exactly one `charSet`
+ expect((html.match(/charSet=/g) || []).length).toBe(1)
+ // Expect exactly one `viewport`
+ expect((html.match(/name="viewport"/g) || []).length).toBe(1)
+ expect(html).toContain('')
+ expect(html).toContain('')
})
test('header helper avoids dedupe of specific tags', async () => {