From 301d9b6eeb0f31ac50d55c224e31c5c4dc017ab1 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 5 May 2020 09:30:20 +0200 Subject: [PATCH] fix: Header test calls html() not to have several elements in the snapshot --- src/components/Header/Header.spec.jsx | 2 +- .../Header/__snapshots__/Header.spec.jsx.snap | 95 +------------------ 2 files changed, 6 insertions(+), 91 deletions(-) diff --git a/src/components/Header/Header.spec.jsx b/src/components/Header/Header.spec.jsx index ea01d9e0bc..e9fd1e6b1d 100644 --- a/src/components/Header/Header.spec.jsx +++ b/src/components/Header/Header.spec.jsx @@ -4,7 +4,7 @@ import Header from './Header' import { useCozyTheme } from 'cozy-ui/transpiled/react/CozyTheme' describe('Header', () => { - const setup = element => mount(element).find('div') + const setup = element => mount(element).html() it(`should display children`, () => { expect(setup(
content
)).toMatchSnapshot() diff --git a/src/components/Header/__snapshots__/Header.spec.jsx.snap b/src/components/Header/__snapshots__/Header.spec.jsx.snap index e2014b3158..955d81b48a 100644 --- a/src/components/Header/__snapshots__/Header.spec.jsx.snap +++ b/src/components/Header/__snapshots__/Header.spec.jsx.snap @@ -1,96 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Header should display children 1`] = ` -Array [ -
-
- content -
-
, -
- content -
, -] -`; +exports[`Header should display children 1`] = `"
content
"`; -exports[`Header should extend className 1`] = ` -Array [ -
-
- content -
-
, -
- content -
, -] -`; +exports[`Header should extend className 1`] = `"
content
"`; -exports[`Header should set position fixed 1`] = ` -Array [ -
-
- content -
-
, -
- content -
, -] -`; +exports[`Header should set position fixed 1`] = `"
content
"`; -exports[`Header should set theme default 1`] = ` -Array [ -
-
- content -
-
, -
- content -
, -] -`; +exports[`Header should set theme default 1`] = `"
content
"`; -exports[`Header should set theme inverted 1`] = ` -Array [ -
-
- content -
-
, -
- content -
, -] -`; +exports[`Header should set theme inverted 1`] = `"
content
"`;