mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
refactor(store): clean up
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { render } from '@testing-library/react';
|
||||
|
||||
import { createFeature } from '@videojs/store';
|
||||
import { createStore } from '@videojs/store/react';
|
||||
import { createStore, useStoreContext } from '@videojs/store/react';
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { Video } from '../video';
|
||||
@@ -75,12 +75,12 @@ describe('video', () => {
|
||||
});
|
||||
|
||||
it('attaches video to store on mount', () => {
|
||||
const { Provider, useStore } = createTestStore();
|
||||
const { Provider } = createTestStore();
|
||||
|
||||
let attachCalled = false;
|
||||
|
||||
function TestComponent() {
|
||||
const store = useStore();
|
||||
const store = useStoreContext();
|
||||
|
||||
// Spy on attach
|
||||
const originalAttach = store.attach.bind(store);
|
||||
|
||||
Reference in New Issue
Block a user