Skip to content

Commit 355525a

Browse files
committed
chore: Move type tests away from src
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.
1 parent 1ec087c commit 355525a

6 files changed

+6
-6
lines changed

packages/nuqs/src/tests/cache.test-d.ts packages/nuqs/tests/cache.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
parseAsBoolean,
55
parseAsInteger,
66
parseAsString
7-
} from '../../dist/server'
7+
} from '../dist/server'
88

99
describe('types/cache', () => {
1010
const cache = createSearchParamsCache({

packages/nuqs/src/tests/parsers.test-d.ts packages/nuqs/tests/parsers.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
parseAsStringLiteral,
1515
parseAsTimestamp,
1616
type inferParserType
17-
} from '../../dist'
17+
} from '../dist'
1818

1919
describe('types/parsers', () => {
2020
test('parseAsString', () => {

packages/nuqs/src/tests/serializer.test-d.ts packages/nuqs/tests/serializer.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { assertType, describe, it } from 'vitest'
2-
import { createSerializer, parseAsInteger, parseAsString } from '../../dist'
2+
import { createSerializer, parseAsInteger, parseAsString } from '../dist'
33

44
describe('types/serializer', () => {
55
const serialize = createSerializer({

packages/nuqs/src/tests/useQueryState.test-d.ts packages/nuqs/tests/useQueryState.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expectTypeOf, it } from 'vitest'
2-
import { parseAsString, useQueryState } from '../../dist'
2+
import { parseAsString, useQueryState } from '../dist'
33

44
describe('types/useQueryState', () => {
55
it('has a nullable string state by default', () => {

packages/nuqs/src/tests/useQueryStates.test-d.ts packages/nuqs/tests/useQueryStates.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expectTypeOf, it } from 'vitest'
2-
import { parseAsInteger, parseAsString, useQueryStates } from '../../dist'
2+
import { parseAsInteger, parseAsString, useQueryStates } from '../dist'
33

44
describe('types/useQueryStates', () => {
55
const parsers = {

packages/nuqs/tsconfig.build.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"extends": "./tsconfig.json",
33
"include": ["src/**/*.ts"],
4-
"exclude": ["src/tests", "src/**/*.test.ts", "src/**/*.test.tsx"]
4+
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"]
55
}

0 commit comments

Comments
 (0)