File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,14 @@ describe('experimental_devServer', () => {
8484 } ,
8585 } as unknown as Options ;
8686
87- let getHandler : any ;
88- mockApp . get = vi . fn ( ( path , handler ) => {
89- getHandler = handler ;
87+ const handlers : Record < string , any > = { } ;
88+ mockApp . get = vi . fn ( ( path : string , handler : any ) => {
89+ handlers [ path ] = handler ;
9090 } ) ;
9191
9292 await ( experimental_devServer as any ) ( mockApp , manifestEnabledOptions ) ;
93+ const getMcpHandler = handlers [ '/mcp' ] ;
94+ expect ( getMcpHandler ) . toBeDefined ( ) ;
9395
9496 const mockReq = {
9597 headers : {
@@ -101,7 +103,7 @@ describe('experimental_devServer', () => {
101103 end : vi . fn ( ) ,
102104 } as any ;
103105
104- await getHandler ( mockReq , mockRes ) ;
106+ await getMcpHandler ( mockReq , mockRes ) ;
105107
106108 expect ( mockRes . end ) . toHaveBeenCalledWith (
107109 expect . stringContaining ( 'This toolset requires Storybook 10.3.0+ with' ) ,
You can’t perform that action at this time.
0 commit comments