Skip to content

Commit

Permalink
Ensure full type coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Jan 22, 2025
1 parent 36a55ec commit 43104ee
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions tests/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,12 @@ describe('syntax proxy', () => {
// Test queries where the second function is called right after the first one.
getProxy.members
.with({ team: 'red' })
// @ts-expect-error This will be improved shortly.
.selecting(['name']),
// Test queries where the second function is not called right after the first one.
getProxy.members
.with({ team: 'blue' })
// @ts-expect-error This will be improved shortly.
.orderedBy.ascending(['joinedAt']),
]);

Expand Down Expand Up @@ -223,6 +225,7 @@ describe('syntax proxy', () => {
// since the latter is able to manipulate the batch context.
alterProxy
.model('newUsers')
// @ts-expect-error This will be improved shortly
.to({ slug: 'accounts' }),
]);

Expand Down Expand Up @@ -264,16 +267,29 @@ describe('syntax proxy', () => {
createProxy.model({
slug: 'account',
}),
alterProxy.model('account').to({
slug: 'users',
}),
alterProxy.model('users').create.field({
slug: 'handle',
}),
alterProxy.model('users').alter.field('handle').to({
name: 'User Handle',
}),
alterProxy.model('users').drop.field('handle'),
alterProxy
.model('account')
// @ts-expect-error This will be improved shortly.
.to({
slug: 'users',
}),
alterProxy
.model('users')
// @ts-expect-error This will be improved shortly.
.create.field({
slug: 'handle',
}),
alterProxy
.model('users')
// @ts-expect-error This will be improved shortly.
.alter.field('handle')
.to({
name: 'User Handle',
}),
alterProxy
.model('users')
// @ts-expect-error This will be improved shortly
.drop.field('handle'),
dropProxy.model('users'),
]);

Expand Down

0 comments on commit 43104ee

Please sign in to comment.