diff --git a/src/server/modules/__tests__/formatter.ts b/src/server/modules/__tests__/formatter.ts index 8ca67601..f931a7d2 100644 --- a/src/server/modules/__tests__/formatter.ts +++ b/src/server/modules/__tests__/formatter.ts @@ -28,13 +28,15 @@ import { Position, TextEdit } from 'vscode-languageserver-types'; import { Notification } from '../../types'; import { FormatterModule } from '../formatter'; -const mockContext = serverMocks.getContext(); -const mockLogger = serverMocks.getLogger(); +let mockContext = serverMocks.getContext(); +let mockLogger = serverMocks.getLogger(); describe('FormatterModule', () => { beforeEach(() => { + jest.restoreAllMocks(); + mockContext = serverMocks.getContext(); mockContext.__options.validate = []; - jest.clearAllMocks(); + mockLogger = serverMocks.getLogger(); }); test('should be constructable', () => {