From 829998568f4e8a44971a9fe7e46a76ec9316cc81 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Mon, 18 Feb 2019 16:09:52 -0700 Subject: fixed folder structure --- mobile/__tests__/App-test.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 mobile/__tests__/App-test.js (limited to 'mobile/__tests__/App-test.js') diff --git a/mobile/__tests__/App-test.js b/mobile/__tests__/App-test.js new file mode 100644 index 0000000..2d73499 --- /dev/null +++ b/mobile/__tests__/App-test.js @@ -0,0 +1,22 @@ +import 'react-native'; +import React from 'react'; +import App from '../App'; +import renderer from 'react-test-renderer'; +import NavigationTestUtils from 'react-navigation/NavigationTestUtils'; + +describe('App snapshot', () => { + jest.useFakeTimers(); + beforeEach(() => { + NavigationTestUtils.resetInternalState(); + }); + + it('renders the loading screen', async () => { + const tree = renderer.create().toJSON(); + expect(tree).toMatchSnapshot(); + }); + + it('renders the root without loading screen', async () => { + const tree = renderer.create().toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); -- cgit v1.2.3