mirror of
https://github.com/jellyfin/jellyfin-expo.git
synced 2024-11-23 05:59:39 +00:00
Add VideoPlayer tests
This commit is contained in:
parent
1b7b6bb98a
commit
d2a9671b75
20
components/__tests__/VideoPlayer.test.js
Normal file
20
components/__tests__/VideoPlayer.test.js
Normal 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();
|
||||
});
|
||||
});
|
58
components/__tests__/__snapshots__/VideoPlayer.test.js.snap
Normal file
58
components/__tests__/__snapshots__/VideoPlayer.test.js.snap
Normal 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>
|
||||
`;
|
Loading…
Reference in New Issue
Block a user