diff --git a/tests/__mocks__/electron.js b/tests/__mocks__/electron.js new file mode 100644 index 0000000..4fc48bc --- /dev/null +++ b/tests/__mocks__/electron.js @@ -0,0 +1,23 @@ +const electron = { + require: jest.fn(), + match: jest.fn(), + app: jest.fn(), + remote: jest.fn(), + shell: jest.fn(), + dialog: jest.fn() +} + +const remote = { + getCurrentWindow: jest.fn() +} + +// for the shell module above +const shell = { + openExternal: jest.fn() +} + +module.exports = { + electron, + remote, + shell +} diff --git a/tests/pages/index.test.jsx b/tests/pages/index.test.jsx index 5a79b3b..9089090 100644 --- a/tests/pages/index.test.jsx +++ b/tests/pages/index.test.jsx @@ -13,6 +13,7 @@ describe('Home', () => { ) expect(container.firstChild).toBeInTheDocument() fireEvent.click(getByText(/Ξ/)) + // fireEvent.click(getByText(/0x/)) }) it('renders Welcome without config', () => {