1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

chore: remvoe console.error for tests expecting error

This commit is contained in:
Ivar Conradi Østhus 2021-10-29 09:25:47 +02:00
parent 0e3813f5f6
commit 9e73ed8f47
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09
3 changed files with 3 additions and 1 deletions

View File

@ -87,6 +87,7 @@ test('should not give api-user ADMIN permission', async () => {
});
test('should not allow user to miss userId', async () => {
jest.spyOn(global.console, 'error').mockImplementation(() => jest.fn());
const accessService = {
hasPermission: jest.fn(),
};
@ -108,6 +109,7 @@ test('should not allow user to miss userId', async () => {
});
test('should return false for missing user', async () => {
jest.spyOn(global.console, 'error').mockImplementation(() => jest.fn());
const accessService = {
hasPermission: jest.fn(),
};

View File

@ -32,7 +32,6 @@ export default class ClientMetricsServiceV2 {
this.bulkInterval = bulkInterval;
this.timer = setInterval(() => {
console.log('Clear metrics');
this.clientMetricsStoreV2.clearMetrics(48);
}, ONE_DAY);
this.timer.unref();

View File

@ -23,6 +23,7 @@ test('should not crash for unknown toggle', async () => {
});
test('should not crash for undefined toggle name', async () => {
jest.spyOn(global.console, 'error').mockImplementation(() => jest.fn());
const project = await featureToggleStore.getProjectId(undefined);
expect(project).toBe(undefined);
});