mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-19 18:02:13 +00:00
Merge pull request #171 from Stremio/video-selected-season
last season selected in videos list
This commit is contained in:
commit
93d6f67eec
2 changed files with 3 additions and 3 deletions
|
|
@ -18,7 +18,7 @@ const reducer = (state, action) => {
|
|||
state.selectedSeason
|
||||
:
|
||||
seasons.length > 0 ?
|
||||
seasons[0]
|
||||
seasons[seasons.length - 1]
|
||||
:
|
||||
null;
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ const videos = [{ 'season': 4 }, { 'season': 5 }, { 'season': 4 }, { 'season': 7
|
|||
|
||||
describe('hooks tests', () => {
|
||||
describe('useSelectableSeasons hook', () => {
|
||||
it('match 4', async () => {
|
||||
it('match 7', async () => {
|
||||
const { result } = renderHook(() => useSelectableSeasons(videos));
|
||||
const [, selectedSeason] = result.current;
|
||||
expect(selectedSeason).toBe(4);
|
||||
expect(selectedSeason).toBe(7);
|
||||
});
|
||||
|
||||
it('match 5', async () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue