mirror of
https://github.com/Unleash/unleash.git
synced 2026-10-12 07:28:17 +00:00
chore: remvoe console.error for tests expecting error
This commit is contained in:
@@ -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(),
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user