mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
Player.jsx Component - Comprehensive Architecture Improvement, fix test
This commit is contained in:
parent
b342035884
commit
e3534fa56b
@ -7,9 +7,9 @@ import { createStore, combineReducers } from 'redux'
|
|||||||
import { ThemeProvider } from '@material-ui/core/styles'
|
import { ThemeProvider } from '@material-ui/core/styles'
|
||||||
import { createMuiTheme } from '@material-ui/core/styles'
|
import { createMuiTheme } from '@material-ui/core/styles'
|
||||||
import { Player } from './Player'
|
import { Player } from './Player'
|
||||||
import { playerReducer } from '../../reducers/player'
|
import { playerReducer } from '../../reducers/playerReducer'
|
||||||
import { settingsReducer } from '../../reducers/settings'
|
import { settingsReducer } from '../../reducers/settingsReducer'
|
||||||
import { replayGainReducer } from '../../reducers/replayGain'
|
import { replayGainReducer } from '../../reducers/replayGainReducer'
|
||||||
|
|
||||||
// Mock dependencies
|
// Mock dependencies
|
||||||
jest.mock('../themes/useCurrentTheme', () => ({
|
jest.mock('../themes/useCurrentTheme', () => ({
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* eslint-env jest */
|
/* eslint-env jest */
|
||||||
|
|
||||||
import { renderHook } from '@testing-library/react'
|
import { renderHook } from '@testing-library/react-hooks'
|
||||||
import { usePlayerState } from './usePlayerState'
|
import { usePlayerState } from './usePlayerState'
|
||||||
import { useDispatch, useSelector } from 'react-redux'
|
import { useDispatch, useSelector } from 'react-redux'
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* eslint-env jest */
|
/* eslint-env jest */
|
||||||
|
|
||||||
import { renderHook, act } from '@testing-library/react'
|
import { renderHook, act } from '@testing-library/react-hooks'
|
||||||
import { usePreloading } from './usePreloading'
|
import { usePreloading } from './usePreloading'
|
||||||
|
|
||||||
describe('usePreloading', () => {
|
describe('usePreloading', () => {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* eslint-env jest */
|
/* eslint-env jest */
|
||||||
|
|
||||||
import { renderHook, act } from '@testing-library/react'
|
import { renderHook, act } from '@testing-library/react-hooks'
|
||||||
import { useReplayGain } from './useReplayGain'
|
import { useReplayGain } from './useReplayGain'
|
||||||
|
|
||||||
// Mock calculateGain utility
|
// Mock calculateGain utility
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* eslint-env jest */
|
/* eslint-env jest */
|
||||||
|
|
||||||
import { renderHook, act } from '@testing-library/react'
|
import { renderHook, act } from '@testing-library/react-hooks'
|
||||||
import { useScrobbling } from './useScrobbling'
|
import { useScrobbling } from './useScrobbling'
|
||||||
|
|
||||||
// Mock subsonic module
|
// Mock subsonic module
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user