mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-21 13:47:39 +02:00
chore: remvoe console.error for tests expecting error
This commit is contained in:
parent
0e3813f5f6
commit
9e73ed8f47
@ -87,6 +87,7 @@ test('should not give api-user ADMIN permission', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should not allow user to miss userId', async () => {
|
test('should not allow user to miss userId', async () => {
|
||||||
|
jest.spyOn(global.console, 'error').mockImplementation(() => jest.fn());
|
||||||
const accessService = {
|
const accessService = {
|
||||||
hasPermission: jest.fn(),
|
hasPermission: jest.fn(),
|
||||||
};
|
};
|
||||||
@ -108,6 +109,7 @@ test('should not allow user to miss userId', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should return false for missing user', async () => {
|
test('should return false for missing user', async () => {
|
||||||
|
jest.spyOn(global.console, 'error').mockImplementation(() => jest.fn());
|
||||||
const accessService = {
|
const accessService = {
|
||||||
hasPermission: jest.fn(),
|
hasPermission: jest.fn(),
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,6 @@ export default class ClientMetricsServiceV2 {
|
|||||||
|
|
||||||
this.bulkInterval = bulkInterval;
|
this.bulkInterval = bulkInterval;
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
console.log('Clear metrics');
|
|
||||||
this.clientMetricsStoreV2.clearMetrics(48);
|
this.clientMetricsStoreV2.clearMetrics(48);
|
||||||
}, ONE_DAY);
|
}, ONE_DAY);
|
||||||
this.timer.unref();
|
this.timer.unref();
|
||||||
|
@ -23,6 +23,7 @@ test('should not crash for unknown toggle', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should not crash for undefined toggle name', async () => {
|
test('should not crash for undefined toggle name', async () => {
|
||||||
|
jest.spyOn(global.console, 'error').mockImplementation(() => jest.fn());
|
||||||
const project = await featureToggleStore.getProjectId(undefined);
|
const project = await featureToggleStore.getProjectId(undefined);
|
||||||
expect(project).toBe(undefined);
|
expect(project).toBe(undefined);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user