File tree Expand file tree Collapse file tree 7 files changed +22
-11
lines changed
Expand file tree Collapse file tree 7 files changed +22
-11
lines changed Original file line number Diff line number Diff line change 44 * Uses shared test setup utilities to ensure consistent database setup
55 */
66
7- // Removed unused 'vi' import (lint)
8- import { setupStandardTestDatabase } from '@turn-based-mcp/shared/dist/testing/vitest-setup.js'
7+ import { setupStandardTestDatabase } from '@turn-based-mcp/shared/testing'
98
109// Setup standard test database using shared utility
1110setupStandardTestDatabase ( )
Original file line number Diff line number Diff line change 55 "type" : " module" ,
66 "main" : " dist/index.js" ,
77 "types" : " dist/index.d.ts" ,
8+ "exports" : {
9+ "." : {
10+ "import" : " ./dist/index.js" ,
11+ "types" : " ./dist/index.d.ts"
12+ },
13+ "./testing" : {
14+ "import" : " ./dist/testing/index.js" ,
15+ "types" : " ./dist/testing/index.d.ts"
16+ },
17+ "./constants" : {
18+ "import" : " ./dist/constants/index.js" ,
19+ "types" : " ./dist/constants/index.d.ts"
20+ }
21+ },
822 "scripts" : {
923 "build" : " tsc && fix-esm-import-path dist" ,
1024 "dev" : " tsc --watch" ,
Original file line number Diff line number Diff line change @@ -4,4 +4,3 @@ export * from './games/index';
44export * from './utils/index' ;
55export * from './storage/index' ;
66export * from './constants/index' ;
7- export * from './testing/index' ;
Original file line number Diff line number Diff line change @@ -7,8 +7,7 @@ import React from 'react'
77import { render , screen } from '@testing-library/react'
88import { DifficultyBadge } from './DifficultyBadge'
99
10- // Mock the shared library constants
11- vi . mock ( '@turn-based-mcp/shared/dist/constants/game-constants' , ( ) => ( {
10+ vi . mock ( '@turn-based-mcp/shared/constants' , ( ) => ( {
1211 getDifficultyDisplay : vi . fn ( ( difficulty : string ) => {
1312 const displays : Record < string , { emoji : string ; label : string } > = {
1413 easy : { emoji : '😌' , label : 'Easy' } ,
Original file line number Diff line number Diff line change 11'use client'
22
3- import { getDifficultyDisplay } from '@turn-based-mcp/shared/dist/constants/game-constants'
4- import type { Difficulty } from '@turn-based-mcp/shared/dist/types/game'
3+ import { getDifficultyDisplay , type Difficulty } from '@turn-based-mcp/shared/constants'
54
65/**
76 * Props for the DifficultyBadge component
Original file line number Diff line number Diff line change 88import { vi } from 'vitest'
99import { NextRequest } from 'next/server'
1010import type { GameType } from '@turn-based-mcp/shared'
11- import {
12- createSharedGameMocks ,
11+
12+ import {
13+ createSharedGameMocks ,
1314 createStorageMocks ,
1415 createMockTicTacToeGameState ,
1516 createMockRPSGameState ,
1617 createMockGameSession
17- } from '@turn-based-mcp/shared'
18+ } from '@turn-based-mcp/shared/testing '
1819
1920/**
2021 * Setup standard API route mocks for a specific game type
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { vi } from 'vitest'
33import '@testing-library/jest-dom'
44
55// Use shared test database setup
6- import { setupStandardTestDatabase } from '@turn-based-mcp/shared/dist/ testing/vitest-setup.js '
6+ import { setupStandardTestDatabase } from '@turn-based-mcp/shared/testing'
77
88// Setup standard test database using shared utility
99setupStandardTestDatabase ( )
You can’t perform that action at this time.
0 commit comments