Add VideoPlayer tests

This commit is contained in:
Bill Thornton 2021-11-16 16:58:17 -05:00
parent 1b7b6bb98a
commit d2a9671b75
2 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,20 @@
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { render } from '@testing-library/react-native';
import React from 'react';
import VideoPlayer from '../VideoPlayer';
describe('VideoPlayer', () => {
it('should render correctly', () => {
const { toJSON } = render(
<VideoPlayer />
);
expect(toJSON()).toMatchSnapshot();
});
});

View File

@ -0,0 +1,58 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`VideoPlayer should render correctly 1`] = `
<View
pointerEvents="box-none"
style={
Object {
"overflow": "hidden",
}
}
>
<ViewManagerAdapter_ExpoVideoView
proxiedProperties={
Object {
"onError": [Function],
"onFullscreenUpdate": [Function],
"onLoad": [Function],
"onLoadStart": [Function],
"onReadyForDisplay": [Function],
"onStatusUpdate": [Function],
"resizeMode": "mock",
"source": undefined,
"status": Object {},
"useNativeControls": true,
}
}
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
/>
<Image
source={
Object {
"uri": undefined,
}
}
style={
Array [
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"resizeMode": "contain",
"right": 0,
"top": 0,
},
undefined,
]
}
/>
</View>
`;