Add test & mock example
This commit is contained in:
parent
1915faa94a
commit
d181ecb697
|
@ -0,0 +1,7 @@
|
||||||
|
// @flow
|
||||||
|
|
||||||
|
import I18nJs from 'i18n-js';
|
||||||
|
|
||||||
|
I18nJs.locale = 'en'; // a locale from your available translations
|
||||||
|
export const getLanguages = () => Promise.resolve('en');
|
||||||
|
export default I18nJs;
|
|
@ -0,0 +1,12 @@
|
||||||
|
import 'react-native';
|
||||||
|
import React from 'react';
|
||||||
|
import App from '../App.js';
|
||||||
|
|
||||||
|
// Note: test renderer must be required after react-native.
|
||||||
|
import renderer from 'react-test-renderer';
|
||||||
|
|
||||||
|
it('renders correctly', () => {
|
||||||
|
const tree = renderer.create(
|
||||||
|
<App />
|
||||||
|
);
|
||||||
|
});
|
Loading…
Reference in New Issue