Skip to content

Commit

Permalink
update test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Druue committed Jul 10, 2024
1 parent 6cd567d commit 316a5a7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
3 changes: 1 addition & 2 deletions packages/language-server/src/__test__/hover.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { test, expect } from 'vitest'
import { test, expect, describe } from 'vitest'
import { handleHoverRequest } from '../lib/MessageHandler'
import { getMultifileHelper } from './MultifileHelper'
import { describe } from 'node:test'

describe('hover', () => {
test('model doc from field', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test('basic doc', async () => {
"targetRange": {
"end": {
"character": 1,
"line": 6,
"line": 10,
},
"start": {
"character": 0,
Expand Down
33 changes: 14 additions & 19 deletions packages/language-server/src/__test__/rename/multi-file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ test('rename model', async () => {
"range": {
"end": {
"character": 1,
"line": 6,
"line": 10,
},
"start": {
"character": 0,
"line": 6,
"line": 10,
},
},
},
Expand All @@ -69,7 +69,7 @@ test('rename model', async () => {
{
"file:///user-posts/Post.prisma": "/// This is a blog post
model Post {
id String @id @default(uuid())
id String @id @default(uuid()) @map("_id")
title String
content String
authorId String
Expand All @@ -78,10 +78,14 @@ test('rename model', async () => {
",
"file:///user-posts/User.prisma": "/// This is the user of the platform
model Account {
id String @id @default(uuid())
id String @id @default(uuid()) @map("_id")
name String
email String
posts Post[]
address Address
favouriteAnimal FavouriteAnimal
@@map("User")
}
",
Expand Down Expand Up @@ -133,19 +137,6 @@ test('rename field', async () => {
},
},
},
{
"newText": " @map("id")",
"range": {
"end": {
"character": 36,
"line": 2,
},
"start": {
"character": 36,
"line": 2,
},
},
},
],
},
}
Expand All @@ -155,7 +146,7 @@ test('rename field', async () => {
{
"file:///user-posts/Post.prisma": "/// This is a blog post
model Post {
id String @id @default(uuid())
id String @id @default(uuid()) @map("_id")
title String
content String
authorId String
Expand All @@ -164,10 +155,14 @@ test('rename field', async () => {
",
"file:///user-posts/User.prisma": "/// This is the user of the platform
model User {
primaryKey String @id @default(uuid() @map("id"))
primaryKey String @id @default(uuid()) @map("_id")
name String
email String
posts Post[]
address Address
favouriteAnimal FavouriteAnimal
}
",
}
Expand Down

0 comments on commit 316a5a7

Please sign in to comment.