File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ export async function runGenerate({
6767 */
6868export function useTestDirectory ( ) : { getTestDir : ( ) => string } {
6969 let testDir = "" ;
70- let cleanup : ( ) => Promise < void > ;
70+ // oxlint-disable-next-line unicorn/consistent-function-scoping -- default avoids undefined if beforeEach fails
71+ let cleanup : ( ) => Promise < void > = async ( ) => { } ;
7172
7273 beforeEach ( async ( ) => {
7374 ( { testDir, cleanup } = await setupTestDirectory ( ) ) ;
Original file line number Diff line number Diff line change @@ -53,10 +53,12 @@ describe("E2E: mcp", () => {
5353 } ) ;
5454
5555 let hasError = false ;
56+ let stderrOutput = "" ;
5657
5758 // Collect stderr output and check for actual errors
5859 mcpProcess . stderr ?. on ( "data" , ( data ) => {
5960 const output = data . toString ( ) ;
61+ stderrOutput += output ;
6062 // Check if the output contains actual error messages (not just warnings)
6163 if ( output . toLowerCase ( ) . includes ( "error" ) && ! output . includes ( "warning" ) ) {
6264 hasError = true ;
@@ -75,6 +77,6 @@ describe("E2E: mcp", () => {
7577 } ) ;
7678
7779 // Verify that there were no actual errors (warnings are acceptable)
78- expect ( hasError ) . toBe ( false ) ;
80+ expect ( hasError , `MCP daemon produced errors: ${ stderrOutput } ` ) . toBe ( false ) ;
7981 } ) ;
8082} ) ;
You can’t perform that action at this time.
0 commit comments