-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from wednesday-solutions/feat/recoil-integrations
Feat/recoil integrations
- Loading branch information
Showing
63 changed files
with
1,024 additions
and
1,857 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: react-native-template | ||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [master, dev] | ||
pull_request: | ||
branches: [ master ] | ||
branches: [master, dev] | ||
jobs: | ||
install-and-test: | ||
runs-on: ubuntu-latest | ||
|
@@ -13,7 +13,7 @@ jobs: | |
run: yarn | ||
|
||
- name: Lint | ||
run: npm run lint | ||
run: yarn lint | ||
|
||
- name: Test and generate coverage report | ||
uses: artiomtr/[email protected] | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
import React from 'react'; | ||
import { RecoilRoot } from 'recoil'; | ||
import { I18nextProvider } from 'react-i18next'; | ||
import 'react-native-gesture-handler'; | ||
import LanguageProvider from '@atoms/LanguageProvider'; | ||
import RootScreen from '@scenes/RootScreen'; | ||
import i18n from '@app/i18n'; | ||
import createStore from '@app/rootReducer'; | ||
|
||
import { Provider } from 'react-redux'; | ||
import { PersistGate } from 'redux-persist/lib/integration/react'; | ||
import 'react-native-gesture-handler'; | ||
const { store, persistor } = createStore(); | ||
const App = () => ( | ||
<Provider store={store}> | ||
<PersistGate loading={null} persistor={persistor}> | ||
<I18nextProvider i18n={i18n}> | ||
<LanguageProvider> | ||
<RootScreen /> | ||
</LanguageProvider> | ||
</I18nextProvider> | ||
</PersistGate> | ||
</Provider> | ||
<RecoilRoot> | ||
<I18nextProvider i18n={i18n}> | ||
<LanguageProvider> | ||
<RootScreen /> | ||
</LanguageProvider> | ||
</I18nextProvider> | ||
</RecoilRoot> | ||
); | ||
|
||
export default App; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
app/components/atoms/LanguageProvider/tests/action.test.js
This file was deleted.
Oops, something went wrong.
68 changes: 30 additions & 38 deletions
68
app/components/atoms/LanguageProvider/tests/index.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,30 @@ | ||
// import React from 'react'; | ||
// import { render } from '@testing-library/react-native'; | ||
// import { Provider } from 'react-redux'; | ||
// import T from '@atoms/T'; | ||
// import createStore from 'app/rootReducer'; | ||
// import { translationMessages } from 'app/i18n'; | ||
// import { renderWithI18next } from '@utils/testUtils'; | ||
// import { Text } from 'react-native'; | ||
// import ConnectedLanguageProvider, { LanguageProvider } from '../index'; | ||
// describe('<LanguageProvider /> container tests', () => { | ||
// it('should render its children', () => { | ||
// const children = ( | ||
// <h1> | ||
// <Text>Test</Text> | ||
// </h1> | ||
// ); | ||
// const container = renderWithI18next( | ||
// <LanguageProvider messages={translationMessages} locale="en"> | ||
// {children} | ||
// </LanguageProvider> | ||
// ); | ||
// expect(container.firstChild).not.toBeNull(); | ||
// }); | ||
// }); | ||
// const setupReduxStore = () => ({ reduxStore: createStore().store }); | ||
// describe('<ConnectedLanguageProvider /> container tests', () => { | ||
// it('should render the default language messages', () => { | ||
// const { reduxStore } = setupReduxStore(); | ||
// const { queryByText } = render( | ||
// <Provider store={reduxStore}> | ||
// <ConnectedLanguageProvider messages={translationMessages}> | ||
// <T id="because" /> | ||
// </ConnectedLanguageProvider> | ||
// </Provider> | ||
// ); | ||
// expect(queryByText('because')).not.toBeNull(); | ||
// }); | ||
// }); | ||
import React from 'react'; | ||
import { render } from '@testing-library/react-native'; | ||
import T from '@atoms/T'; | ||
import { renderWithI18next } from '@utils/testUtils'; | ||
import { Text } from 'react-native'; | ||
import ConnectedLanguageProvider, { LanguageProvider } from '../index'; | ||
describe('<LanguageProvider /> container tests', () => { | ||
it('should render its children', () => { | ||
const children = ( | ||
<h1> | ||
<Text>Test</Text> | ||
</h1> | ||
); | ||
const container = renderWithI18next( | ||
<LanguageProvider>{children}</LanguageProvider> | ||
); | ||
expect(container.firstChild).not.toBeNull(); | ||
}); | ||
}); | ||
|
||
describe('<ConnectedLanguageProvider /> container tests', () => { | ||
it('should render the default language messages', () => { | ||
const { queryByText } = render( | ||
<ConnectedLanguageProvider> | ||
<T id="because" /> | ||
</ConnectedLanguageProvider> | ||
); | ||
expect(queryByText('because')).not.toBeNull(); | ||
}); | ||
}); |
26 changes: 0 additions & 26 deletions
26
app/components/atoms/LanguageProvider/tests/reducer.test.js
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
app/components/atoms/LanguageProvider/tests/selectors.test.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.