Skip to content

Commit

Permalink
chore: Move type tests away from src (#897)
Browse files Browse the repository at this point in the history
There is no need for them to be in src since they test against
the built types in dist.
Moving them out cleans it all up and allows for shorter relative import paths.
  • Loading branch information
franky47 authored Feb 5, 2025
1 parent 1ec087c commit df6340b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
parseAsBoolean,
parseAsInteger,
parseAsString
} from '../../dist/server'
} from '../dist/server'

describe('types/cache', () => {
const cache = createSearchParamsCache({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
parseAsStringLiteral,
parseAsTimestamp,
type inferParserType
} from '../../dist'
} from '../dist'

describe('types/parsers', () => {
test('parseAsString', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertType, describe, it } from 'vitest'
import { createSerializer, parseAsInteger, parseAsString } from '../../dist'
import { createSerializer, parseAsInteger, parseAsString } from '../dist'

describe('types/serializer', () => {
const serialize = createSerializer({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expectTypeOf, it } from 'vitest'
import { parseAsString, useQueryState } from '../../dist'
import { parseAsString, useQueryState } from '../dist'

describe('types/useQueryState', () => {
it('has a nullable string state by default', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expectTypeOf, it } from 'vitest'
import { parseAsInteger, parseAsString, useQueryStates } from '../../dist'
import { parseAsInteger, parseAsString, useQueryStates } from '../dist'

describe('types/useQueryStates', () => {
const parsers = {
Expand Down
2 changes: 1 addition & 1 deletion packages/nuqs/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["src/**/*.ts"],
"exclude": ["src/tests", "src/**/*.test.ts", "src/**/*.test.tsx"]
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"]
}

0 comments on commit df6340b

Please sign in to comment.