diff --git a/src/__mocks__/render.js b/src/__mocks__/render.js index 7b945e49..76871dd6 100644 --- a/src/__mocks__/render.js +++ b/src/__mocks__/render.js @@ -2,8 +2,10 @@ import React from 'react' import { Provider } from 'react-redux' import renderer from 'react-test-renderer' import { ThemeProvider } from 'styled-components' +import { I18nextProvider } from 'react-i18next' import createStore from 'renderer/createStore' +import i18n from 'renderer/i18n/electron' import theme from 'styles/theme' @@ -11,9 +13,11 @@ export default function render(component, state) { const store = createStore({ state }) return renderer .create( - - {component} - , + + + {component} + + , ) .toJSON() } diff --git a/src/helpers/staticPath.js b/src/helpers/staticPath.js index 1351ec63..102fe5a7 100644 --- a/src/helpers/staticPath.js +++ b/src/helpers/staticPath.js @@ -7,4 +7,4 @@ export default (__DEV__ && !STORYBOOK_ENV && NODE_ENV !== 'test' ? __static : isRunningInAsar ? __dirname.replace(/app\.asar$/, 'static') - : !STORYBOOK_ENV ? `${__dirname}/../static` : 'static') + : !STORYBOOK_ENV ? `${__dirname}/../../static` : 'static') diff --git a/src/renderer/i18n/instanciate.js b/src/renderer/i18n/instanciate.js index d8a6eec8..a4ff9e7b 100644 --- a/src/renderer/i18n/instanciate.js +++ b/src/renderer/i18n/instanciate.js @@ -4,7 +4,7 @@ const commonConfig = { fallbackLng: 'en', debug: false, react: { - wait: true, + wait: process.env.NODE_ENV !== 'test', }, }