mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(html): refactor attach contexts to carry state and setter (#1024)
Co-authored-by: Wesley Luyten <luwes@users.noreply.github.com>
This commit is contained in:
@@ -34,7 +34,13 @@ export function createMockStore(state: Record<string, unknown> = {}) {
|
||||
*/
|
||||
export function createPlayerWrapper(storeState: Record<string, unknown> = {}) {
|
||||
const store = createMockStore(storeState);
|
||||
const value: PlayerContextValue = { store: store as any, media: null, setMedia: vi.fn(), setContainer: vi.fn() };
|
||||
const value: PlayerContextValue = {
|
||||
store: store as any,
|
||||
media: null,
|
||||
setMedia: vi.fn(),
|
||||
container: null,
|
||||
setContainer: vi.fn(),
|
||||
};
|
||||
|
||||
return {
|
||||
store,
|
||||
|
||||
Reference in New Issue
Block a user