Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicarq committed Jan 7, 2025
1 parent ffadca2 commit b2d0cb3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('usePyodideInstance', () => {
});

it('should initialize Pyodide and file system service', async () => {
mockPyodide.FS.syncfs.mockImplementation((populate, callback) => callback(null));
mockPyodide.FS.syncfs.mockImplementation((populate: boolean, callback: (err: Error | null) => void) => callback(null));

const { result } = renderHook(() => usePyodideInstance());

Expand Down Expand Up @@ -67,7 +67,7 @@ describe('usePyodideInstance', () => {
});

it('should reuse existing Pyodide instance', async () => {
mockPyodide.FS.syncfs.mockImplementation((populate, callback) => callback(null));
mockPyodide.FS.syncfs.mockImplementation((populate: boolean, callback: (err: Error | null) => void) => callback(null));

const { result } = renderHook(() => usePyodideInstance());

Expand All @@ -91,7 +91,7 @@ describe('usePyodideInstance', () => {
});

it('should handle file system initialization errors', async () => {
mockPyodide.FS.syncfs.mockImplementation((populate, callback) => callback(new Error('Sync failed')));
mockPyodide.FS.syncfs.mockImplementation((populate: boolean, callback: (err: Error | null) => void) => callback(new Error('Sync failed')));

const { result } = renderHook(() => usePyodideInstance());

Expand Down

0 comments on commit b2d0cb3

Please sign in to comment.