Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
test: fix core tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MessiasLima committed Jun 30, 2022
1 parent 7e8e25d commit 3281671
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Expand Up @@ -3,6 +3,9 @@ describe('application interface on non electron environment', () => {
return { ipcMain: undefined };
});

jest.mock('../InterfaceChannel', () => null);
jest.mock('../../service/application/ApplicationService', () => null);

const { ipcMain } = require('./ApplicationInterface');

it('should not throw error', () => {
Expand Down
2 changes: 2 additions & 0 deletions core/interface/settings/SettingsInterfaceNonElectron.spec.js
Expand Up @@ -2,6 +2,8 @@ describe('settings interface on non electron environment', () => {
jest.mock('electron', () => {
return { ipcMain: undefined };
});
jest.mock('../InterfaceChannel', () => null);
jest.mock('../../service/settings/SettingsService', () => null);

const { ipcMain } = require('./SettingsInterface');

Expand Down
1 change: 1 addition & 0 deletions core/repository/application/ApplicationRepository.spec.js
Expand Up @@ -2,6 +2,7 @@ const Application = require('../../model/Application');

const testConnectionFactory = require('../__mocks__/TestConnectionFactory');

jest.mock('uuid', () => 'eb7b7961-395d-4b4c-afc6-9ebcadaf0150');
jest.mock('../ConnectionFactory', () => testConnectionFactory);

describe('Application repository', () => {
Expand Down
1 change: 1 addition & 0 deletions core/repository/settings/SettingsRepository.spec.js
@@ -1,5 +1,6 @@
const testConnectionFactory = require('../__mocks__/TestConnectionFactory');

jest.mock('uuid', () => 'eb7b7961-395d-4b4c-afc6-9ebcadaf0150');
jest.mock('../ConnectionFactory', () => testConnectionFactory);

describe('Settings repository', () => {
Expand Down

0 comments on commit 3281671

Please sign in to comment.