Skip to content

Commit

Permalink
more stylecheck — come on AI
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Dec 19, 2024
1 parent 54eec3e commit f61ea5f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/typescript-client/test/client.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,25 @@ describe(`client`, () => {
})
})

describe('params validation', () => {
it('should allow valid params', () => {
describe(`params validation`, () => {
it(`should allow valid params`, () => {
const validParams: ExternalParamsRecord = {
// PostgreSQL params
table: 'users',
columns: ['id', 'name'],
where: 'id > 0',
replica: 'full',
table: `users`,
columns: [`id`, `name`],
where: `id > 0`,
replica: `full`,

// Custom params
customParam: 'value',
customArrayParam: ['value1', 'value2'],
customFunctionParam: () => 'value',
customAsyncFunctionParam: async () => ['value1', 'value2'],
customParam: `value`,
customArrayParam: [`value1`, `value2`],
customFunctionParam: () => `value`,
customAsyncFunctionParam: async () => [`value1`, `value2`],
}
expectTypeOf(validParams).toEqualTypeOf<ExternalParamsRecord>()
})

it('should not allow reserved params', () => {
it(`should not allow reserved params`, () => {
// Test that reserved parameters are not allowed in ExternalParamsRecord
type WithReservedParam1 = { [COLUMNS_QUERY_PARAM]: string[] }
type WithReservedParam2 = { [LIVE_CACHE_BUSTER_QUERY_PARAM]: string }
Expand Down

0 comments on commit f61ea5f

Please sign in to comment.