diff --git a/packages/integration/test/property-name-completion.test.ts b/packages/integration/test/property-name-completion.test.ts new file mode 100644 index 0000000..03d2e56 --- /dev/null +++ b/packages/integration/test/property-name-completion.test.ts @@ -0,0 +1,34 @@ +import { testWorker } from '../src/testWorker.ts' +import { test, expect } from '@jest/globals' + +test.skip('property-name-completion', async () => { + const execMap = { + 'Json.loadSchema'() { + return { + type: 'object', + properties: { + type: { + type: 'string', + enum: ['commonjs', 'module'], + }, + }, + } + }, + } + const worker = await testWorker({ + execMap, + }) + const offset = 3 + const textDocument = { + uri: 'test://test.json', + text: `{ "" }`, + } + expect( + await worker.execute('Completion.getCompletion', textDocument, offset), + ).toEqual([ + { + kind: 2, + label: 'type', + }, + ]) +})