Skip to content

Commit 2de5c4d

Browse files
committed
fix: jest
1 parent c2e10a8 commit 2de5c4d

File tree

11 files changed

+27
-4
lines changed

11 files changed

+27
-4
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
"@commitlint/cli": "19.2.2",
129129
"@commitlint/config-conventional": "10.0.0",
130130
"@redocly/cli": "1.34.1",
131+
"@sinclair/typebox": "0.34.48",
131132
"@stacks/eslint-config": "1.2.0",
132133
"@types/dockerode": "3.3.39",
133134
"@types/dotenv-flow": "3.2.0",

src/api/schemas/util.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import { TSchema, Type } from 'typebox';
22

33
export const Nullable = <T extends TSchema>(schema: T) => Type.Union([schema, Type.Null()]);
44
export const OptionalNullable = <T extends TSchema>(schema: T) => Type.Optional(Nullable(schema));
5-
export const PaginatedResponse = <T extends TSchema>(
6-
type: T,
7-
options?: Record<string, unknown>
8-
) =>
5+
export const PaginatedResponse = <T extends TSchema>(type: T, options?: Record<string, unknown>) =>
96
Type.Object(
107
{
118
limit: Type.Integer({ examples: [20] }),

tests/jest.config.2.5.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const config = {
66
testMatch: ['<rootDir>/tests/2.5/**/*.test.ts'],
77
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
88
coverageDirectory: '<rootDir>/coverage',
9+
moduleNameMapper: {
10+
'^typebox$': '@sinclair/typebox',
11+
},
912
globalSetup: '<rootDir>/tests/2.5/global-setup.ts',
1013
globalTeardown: '<rootDir>/tests/2.5/global-teardown.ts',
1114
setupFilesAfterEnv: ['<rootDir>/tests/2.5/env-setup.ts'],

tests/jest.config.api.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ module.exports = {
44
testMatch: ['<rootDir>/tests/api/**/*.test.ts'],
55
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
66
coverageDirectory: '<rootDir>/coverage',
7+
moduleNameMapper: {
8+
'^typebox$': '@sinclair/typebox',
9+
},
710
globalSetup: '<rootDir>/tests/api/setup.ts',
811
globalTeardown: '<rootDir>/tests/api/teardown.ts',
912
testTimeout: 20000,

tests/jest.config.bns-e2e.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const config = {
66
testMatch: ['<rootDir>/tests/bns-e2e/*.test.ts'],
77
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
88
coverageDirectory: '<rootDir>/coverage',
9+
moduleNameMapper: {
10+
'^typebox$': '@sinclair/typebox',
11+
},
912
globalSetup: '<rootDir>/tests/bns-e2e/setup.ts',
1013
globalTeardown: '<rootDir>/tests/bns-e2e/teardown.ts',
1114
testTimeout: 3600000,

tests/jest.config.bns.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ module.exports = {
44
testMatch: ['<rootDir>/tests/bns/*.test.ts'],
55
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
66
coverageDirectory: '<rootDir>/coverage',
7+
moduleNameMapper: {
8+
'^typebox$': '@sinclair/typebox',
9+
},
710
globalSetup: '<rootDir>/tests/bns/setup.ts',
811
globalTeardown: '<rootDir>/tests/bns/teardown.ts',
912
testTimeout: 60000,

tests/jest.config.btc-faucet.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ module.exports = {
44
testMatch: ['<rootDir>/tests/btc-faucet/*.test.ts'],
55
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
66
coverageDirectory: '<rootDir>/coverage',
7+
moduleNameMapper: {
8+
'^typebox$': '@sinclair/typebox',
9+
},
710
globalSetup: '<rootDir>/tests/btc-faucet/setup.ts',
811
globalTeardown: '<rootDir>/tests/btc-faucet/teardown.ts',
912
testTimeout: 60000,

tests/jest.config.event-replay.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ module.exports = {
44
testMatch: ['<rootDir>/tests/event-replay/**/*.test.ts'],
55
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
66
coverageDirectory: '<rootDir>/coverage',
7+
moduleNameMapper: {
8+
'^typebox$': '@sinclair/typebox',
9+
},
710
globalSetup: '<rootDir>/tests/event-replay/setup.ts',
811
globalTeardown: '<rootDir>/tests/event-replay/teardown.ts',
912
testTimeout: 20000,

tests/jest.config.rpc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const config = {
66
testMatch: ['<rootDir>/tests/rpc/*.test.ts'],
77
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
88
coverageDirectory: '<rootDir>/coverage',
9+
moduleNameMapper: {
10+
'^typebox$': '@sinclair/typebox',
11+
},
912
globalSetup: '<rootDir>/tests/rpc/setup.ts',
1013
globalTeardown: '<rootDir>/tests/rpc/teardown.ts',
1114
testTimeout: 60_000,

0 commit comments

Comments
 (0)