Skip to content

Commit

Permalink
chore: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
soedirgo committed Oct 28, 2024
1 parent a04e00d commit 9490e86
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const supabase = createClient<Database>(URL, KEY)
if (error) {
throw new Error(error.message)
}
expectType<Database['public']['Tables']['users']['Row'] | null>(message.user)
expectType<Database['public']['Tables']['users']['Row']>(message.user)
}

// one-to-many relationship
Expand All @@ -98,9 +98,8 @@ const supabase = createClient<Database>(URL, KEY)

// referencing missing column
{
type SelectQueryError<Message extends string> = { error: true } & Message
const res = await supabase.from('users').select('username, dat')
expectType<PostgrestSingleResponse<SelectQueryError<`Referencing missing column \`dat\``>[]>>(res)
expectType<PostgrestSingleResponse<"column 'dat' does not exist on 'users'."[]>>(res)
}

// one-to-one relationship
Expand Down

0 comments on commit 9490e86

Please sign in to comment.