Skip to content

Commit b784250

Browse files
author
Loïc Mangeonjean
committed
fix: update tests
1 parent 10ca0e0 commit b784250

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/tests/infrastructure.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { createEditor, initializePromise, monaco, registerEditorOpenHandler } from '@codingame/monaco-editor-wrapper'
2-
import { initUserConfiguration } from '@codingame/monaco-vscode-configuration-service-override'
1+
import { createEditor, initialize, monaco, registerEditorOpenHandler } from '@codingame/monaco-editor-wrapper'
32
import { CompletionTriggerKind, ServerCapabilities, TextDocumentSyncKind, Range } from 'vscode-languageserver-protocol'
43
import {
54
_Connection,
@@ -271,12 +270,13 @@ async function testLanguageClient (
271270
}
272271

273272
beforeAll(async () => {
274-
await initializePromise
273+
await initialize({
274+
configurationDefaults: {
275+
'files.autoSave': 'off'
276+
}
277+
})
275278
})
276279

277-
void initUserConfiguration(JSON.stringify({
278-
'files.autoSave': 'off'
279-
}))
280280
describe('Infrastructure', () => {
281281
test('Codingame behavior without mutualization', async () => {
282282
await testLanguageClient(false, false)

src/tests/lifecycle.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { whenReady } from '@codingame/monaco-vscode-java-default-extension'
2+
import { initialize } from '@codingame/monaco-editor-wrapper'
23
import { TestInfrastructure } from './tools'
34
import { createLanguageClientManager, getLanguageClientOptions } from '..'
45

6+
beforeAll(async () => {
7+
await initialize()
8+
})
9+
510
describe('Lifecycle', () => {
611
test('Can dispose the language client manager immediately', async () => {
712
const infrastructure = new TestInfrastructure(false, false, 2000)

0 commit comments

Comments
 (0)