Skip to content

Commit

Permalink
feature: add property completion test (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
levivilet authored Feb 9, 2025
1 parent d79680f commit 0ed4e60
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions packages/integration/test/property-name-completion.test.ts
Original file line number Diff line number Diff line change
@@ -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',
},
])
})

0 comments on commit 0ed4e60

Please sign in to comment.