Skip to content

Commit

Permalink
test (failing): validate @db pops up as auto-completable
Browse files Browse the repository at this point in the history
  • Loading branch information
Druue committed Nov 3, 2022
1 parent 9ebec5d commit 168439c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/language-server/src/__test__/completion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,10 @@ suite('Completions', function () {
label: '@ignore',
kind: CompletionItemKind.Property,
}
const fieldAttributeDatasourceName = {
label: '@db',
kind: CompletionItemKind.Property,
}

const functionCuid = {
label: 'cuid()',
Expand Down Expand Up @@ -1852,6 +1856,7 @@ suite('Completions', function () {
label: 'dbgenerated("")',
kind: CompletionItemKind.Function,
}

const staticValueEmptyList = {
label: '[]',
kind: CompletionItemKind.Value,
Expand Down Expand Up @@ -1943,6 +1948,7 @@ suite('Completions', function () {
fieldAttributeDefault,
fieldAttributeRelation,
fieldAttributeIgnore,
fieldAttributeDatasourceName,
],
},
})
Expand Down Expand Up @@ -2024,6 +2030,17 @@ suite('Completions', function () {
items: [{ label: 'lastName', kind: CompletionItemKind.Field }],
},
})

assertCompletion({
schema: /* Prisma */ `
model User {
firstName String
}`,
expected: {
isIncomplete: false,
items: [],
},
})
})

const enumUserTypeExpectedItems = [
Expand Down

0 comments on commit 168439c

Please sign in to comment.