diff --git a/Libraries/Components/MaskedView/__tests__/MaskedViewIOS-test.js b/Libraries/Components/MaskedView/__tests__/MaskedViewIOS-test.js new file mode 100644 index 00000000000..01abd518ca7 --- /dev/null +++ b/Libraries/Components/MaskedView/__tests__/MaskedViewIOS-test.js @@ -0,0 +1,81 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @emails oncall+react_native + * @flow + */ + +'use strict'; + +const React = require('React'); +const Text = require('Text'); +const View = require('View'); +const MaskedViewIOS = require('MaskedViewIOS'); + +const render = require('../../../../jest/renderer'); + +describe('', () => { + it('should render as when mocked', () => { + const instance = render.create( + + Basic Mask + + }> + + , + ); + expect(instance).toMatchSnapshot(); + }); + + it('should shallow render as when mocked', () => { + const output = render.shallow( + + Basic Mask + + }> + + , + ); + expect(output).toMatchSnapshot(); + }); + + it('should shallow render as when not mocked', () => { + jest.dontMock('MaskedViewIOS'); + + const output = render.shallow( + + Basic Mask + + }> + + , + ); + expect(output).toMatchSnapshot(); + }); + + it('should render as when not mocked', () => { + jest.dontMock('MaskedViewIOS'); + + const instance = render.create( + + Basic Mask + + }> + + , + ); + expect(instance).toMatchSnapshot(); + }); +}); diff --git a/Libraries/Components/MaskedView/__tests__/__snapshots__/MaskedViewIOS-test.js.snap b/Libraries/Components/MaskedView/__tests__/__snapshots__/MaskedViewIOS-test.js.snap new file mode 100644 index 00000000000..528e33e0e49 --- /dev/null +++ b/Libraries/Components/MaskedView/__tests__/__snapshots__/MaskedViewIOS-test.js.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render as when mocked 1`] = ` + + + + + Basic Mask + + + + + +`; + +exports[` should render as when not mocked 1`] = ` + + + + + Basic Mask + + + + + +`; + +exports[` should shallow render as when mocked 1`] = ` + + + Basic Mask + + + } +> + + +`; + +exports[` should shallow render as when not mocked 1`] = ` + + + Basic Mask + + + } +> + + +`; diff --git a/Libraries/Components/Picker/__tests__/Picker-test.js b/Libraries/Components/Picker/__tests__/Picker-test.js new file mode 100644 index 00000000000..05d66379949 --- /dev/null +++ b/Libraries/Components/Picker/__tests__/Picker-test.js @@ -0,0 +1,63 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @emails oncall+react_native + * @flow + */ + +'use strict'; + +const React = require('React'); +const Picker = require('../Picker'); + +const render = require('../../../../jest/renderer'); + +describe('', () => { + it('should render as when mocked', () => { + const instance = render.create( + + + + , + ); + expect(instance).toMatchSnapshot(); + }); + + it('should shallow render as when mocked', () => { + const output = render.shallow( + + + + , + ); + expect(output).toMatchSnapshot(); + }); + + it('should shallow render as when not mocked', () => { + jest.dontMock('Picker'); + + const output = render.shallow( + + + + , + ); + expect(output).toMatchSnapshot(); + }); + + it('should render as when not mocked', () => { + jest.dontMock('Picker'); + + const instance = render.create( + + + + , + ); + expect(instance).toMatchSnapshot(); + }); +}); diff --git a/Libraries/Components/Picker/__tests__/__snapshots__/Picker-test.js.snap b/Libraries/Components/Picker/__tests__/__snapshots__/Picker-test.js.snap new file mode 100644 index 00000000000..00b157697b7 --- /dev/null +++ b/Libraries/Components/Picker/__tests__/__snapshots__/Picker-test.js.snap @@ -0,0 +1,101 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render as when mocked 1`] = ` + + + +`; + +exports[` should render as when not mocked 1`] = ` + + + +`; + +exports[` should shallow render as when mocked 1`] = ` + + + + +`; + +exports[` should shallow render as when not mocked 1`] = ` + + + + +`; diff --git a/Libraries/Components/ProgressBarAndroid/__tests__/ProgressBarAndroid-test.js b/Libraries/Components/ProgressBarAndroid/__tests__/ProgressBarAndroid-test.js new file mode 100644 index 00000000000..7cdaad5ed46 --- /dev/null +++ b/Libraries/Components/ProgressBarAndroid/__tests__/ProgressBarAndroid-test.js @@ -0,0 +1,52 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @emails oncall+react_native + * @flow + */ + +'use strict'; + +const React = require('React'); +// $FlowFixMe +const ProgressBarAndroid = require('../ProgressBarAndroid.android'); + +const render = require('../../../../jest/renderer'); + +describe('', () => { + it('should render as when mocked', () => { + const instance = render.create( + , + ); + expect(instance).toMatchSnapshot(); + }); + + it('should shallow render as when mocked', () => { + const output = render.shallow( + , + ); + expect(output).toMatchSnapshot(); + }); + + it('should shallow render as when not mocked', () => { + jest.dontMock('ProgressBarAndroid'); + + const output = render.shallow( + , + ); + expect(output).toMatchSnapshot(); + }); + + it('should render as when not mocked', () => { + jest.dontMock('ProgressBarAndroid'); + + const instance = render.create( + , + ); + expect(instance).toMatchSnapshot(); + }); +}); diff --git a/Libraries/Components/ProgressBarAndroid/__tests__/__snapshots__/ProgressBarAndroid-test.js.snap b/Libraries/Components/ProgressBarAndroid/__tests__/__snapshots__/ProgressBarAndroid-test.js.snap new file mode 100644 index 00000000000..7d45cab7a90 --- /dev/null +++ b/Libraries/Components/ProgressBarAndroid/__tests__/__snapshots__/ProgressBarAndroid-test.js.snap @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render as when mocked 1`] = ` + +`; + +exports[` should render as when not mocked 1`] = ` + +`; + +exports[` should shallow render as when mocked 1`] = ` + +`; + +exports[` should shallow render as when not mocked 1`] = ` + +`; diff --git a/Libraries/Components/ProgressViewIOS/__tests__/ProgressViewIOS-test.js b/Libraries/Components/ProgressViewIOS/__tests__/ProgressViewIOS-test.js new file mode 100644 index 00000000000..48f2105afe4 --- /dev/null +++ b/Libraries/Components/ProgressViewIOS/__tests__/ProgressViewIOS-test.js @@ -0,0 +1,43 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @emails oncall+react_native + * @flow + */ + +'use strict'; + +const React = require('React'); +const ProgressViewIOS = require('../ProgressViewIOS'); + +const render = require('../../../../jest/renderer'); + +describe('', () => { + it('should render as when mocked', () => { + const instance = render.create(); + expect(instance).toMatchSnapshot(); + }); + + it('should shallow render as when mocked', () => { + const output = render.shallow(); + expect(output).toMatchSnapshot(); + }); + + it('should shallow render as when not mocked', () => { + jest.dontMock('ProgressViewIOS'); + + const output = render.shallow(); + expect(output).toMatchSnapshot(); + }); + + it('should render as when not mocked', () => { + jest.dontMock('ProgressViewIOS'); + + const instance = render.create(); + expect(instance).toMatchSnapshot(); + }); +}); diff --git a/Libraries/Components/ProgressViewIOS/__tests__/__snapshots__/ProgressViewIOS-test.js.snap b/Libraries/Components/ProgressViewIOS/__tests__/__snapshots__/ProgressViewIOS-test.js.snap new file mode 100644 index 00000000000..0db8c940aa4 --- /dev/null +++ b/Libraries/Components/ProgressViewIOS/__tests__/__snapshots__/ProgressViewIOS-test.js.snap @@ -0,0 +1,41 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render as when mocked 1`] = ` + +`; + +exports[` should render as when not mocked 1`] = ` + +`; + +exports[` should shallow render as when mocked 1`] = ` + +`; + +exports[` should shallow render as when not mocked 1`] = ` + +`; diff --git a/Libraries/Modal/__tests__/Modal-test.js b/Libraries/Modal/__tests__/Modal-test.js new file mode 100644 index 00000000000..9d9b9b89a5b --- /dev/null +++ b/Libraries/Modal/__tests__/Modal-test.js @@ -0,0 +1,60 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @emails oncall+react_native + * @flow + */ + +'use strict'; + +const React = require('React'); +const View = require('View'); +const Modal = require('../Modal'); + +const render = require('../../../jest/renderer'); + +describe('', () => { + it('should render as when mocked', () => { + const instance = render.create( + + + , + ); + expect(instance).toMatchSnapshot(); + }); + + it('should shallow render as when mocked', () => { + const output = render.shallow( + + + , + ); + expect(output).toMatchSnapshot(); + }); + + it('should shallow render as when not mocked', () => { + jest.dontMock('Modal'); + + const output = render.shallow( + + + , + ); + expect(output).toMatchSnapshot(); + }); + + it('should render as when not mocked', () => { + jest.dontMock('Modal'); + + const instance = render.create( + + + , + ); + expect(instance).toMatchSnapshot(); + }); +}); diff --git a/Libraries/Modal/__tests__/__snapshots__/Modal-test.js.snap b/Libraries/Modal/__tests__/__snapshots__/Modal-test.js.snap new file mode 100644 index 00000000000..8aa3579e006 --- /dev/null +++ b/Libraries/Modal/__tests__/__snapshots__/Modal-test.js.snap @@ -0,0 +1,79 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render as when mocked 1`] = ` + + + +`; + +exports[` should render as when not mocked 1`] = ` + + + + + + + + + +`; + +exports[` should shallow render as when mocked 1`] = ` + + + +`; + +exports[` should shallow render as when not mocked 1`] = ` + + + +`;