From 2a60fcdc3b79ef7adbece6acc0a8b216419aa8de Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Tue, 24 Jan 2017 18:51:08 +0200 Subject: [PATCH] Snapshot tests need IntlProvider - even when using default locales --- src/containers/LandingPage/LandingPage.test.js | 9 ++++++--- .../LandingPage/__snapshots__/LandingPage.test.js.snap | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/containers/LandingPage/LandingPage.test.js b/src/containers/LandingPage/LandingPage.test.js index bce166df..632904c7 100644 --- a/src/containers/LandingPage/LandingPage.test.js +++ b/src/containers/LandingPage/LandingPage.test.js @@ -1,15 +1,18 @@ import React from 'react'; import { BrowserRouter } from 'react-router'; import renderer from 'react-test-renderer'; +import { IntlProvider } from 'react-intl'; import LandingPage from './LandingPage'; describe('LandingPage', () => { it('matches snapshot', () => { const component = renderer.create( ( - - - + + + + + ), ); const tree = component.toJSON(); diff --git a/src/containers/LandingPage/__snapshots__/LandingPage.test.js.snap b/src/containers/LandingPage/__snapshots__/LandingPage.test.js.snap index e44f93ea..90f926b5 100644 --- a/src/containers/LandingPage/__snapshots__/LandingPage.test.js.snap +++ b/src/containers/LandingPage/__snapshots__/LandingPage.test.js.snap @@ -128,7 +128,9 @@ exports[`LandingPage matches snapshot 1`] = ` href="/s?location=helsinki" onClick={[Function]} style={Object {}}> - Find studios + + Show nice studios! (default) + `;