Skip to content

Commit

Permalink
Fixed jest error
Browse files Browse the repository at this point in the history
  • Loading branch information
HaruChanHeart committed Dec 23, 2023
1 parent 65ee52f commit d01ee3f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/__tests__/App.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import '@testing-library/jest-dom';
import { render } from '@testing-library/react';
import App from '../renderer/App';

const mockElectron = {
ipcRenderer: {
sendMessage: jest.fn(),
on: jest.fn(),
once: jest.fn(),
removeEventListener: jest.fn(),
},
};

beforeAll(() => {
global.window.electron = mockElectron;
});

describe('App', () => {
it('should render', () => {
expect(render(<App />)).toBeTruthy();
});
});

0 comments on commit d01ee3f

Please sign in to comment.