Add test & mock example

This commit is contained in:
Mathieu Acthernoene 2017-08-27 20:24:10 +02:00
parent 1915faa94a
commit d181ecb697
2 changed files with 19 additions and 0 deletions

View File

@ -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;

View File

@ -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 />
);
});