Skip to content

Commit

Permalink
chore: clean up RouteParams type test structure (#9573)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Choudhury <dannychoudhury@gmail.com>
  • Loading branch information
mrazauskas and dac09 authored Nov 27, 2023
1 parent 0acfae3 commit ed485ba
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/router/src/__typetests__/routeParamsTypes.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { context, describe, expect, test } from 'tstyche'
import { describe, expect, test } from 'tstyche'

import type { RouteParams, ParamType } from '../routeParamsTypes'

Expand Down Expand Up @@ -90,14 +90,12 @@ describe('RouteParams<>', () => {
expect(globRoutes.description).type.toBeString()
})

context('Glob params in the middle', () => {
test('Multiple Glob route params', () => {
const middleGlob: RouteParams<'/repo/{folders...}/edit'> = {
folders: 'src/lib/auth.js',
}
test('Glob params in the middle', () => {
const middleGlob: RouteParams<'/repo/{folders...}/edit'> = {
folders: 'src/lib/auth.js',
}

expect(middleGlob.folders).type.toBeString()
})
expect(middleGlob.folders).type.toBeString()
})

test('Mixed typed and untyped params', () => {
Expand Down

0 comments on commit ed485ba

Please sign in to comment.