File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -278,7 +278,13 @@ describe('auth_forms', () => {
278278
279279 await createAuthFormWithFallback ( ) ;
280280
281- expect ( mockConsoleWarn ) . toHaveBeenCalledWith ( 'Error:' , 'Test error message' ) ;
281+ expect ( mockConsoleWarn ) . toHaveBeenCalledWith (
282+ 'Create authForm strategy: Failed to (Basic case) Use standard superValidate' ,
283+ ) ;
284+ // Error objects are converted to string and include stack trace
285+ expect ( mockConsoleWarn ) . toHaveBeenCalledWith (
286+ expect . stringContaining ( 'Error: Test error message' ) ,
287+ ) ;
282288 } ) ;
283289
284290 // Note: "expect to not log warnings in production mode" was removed
@@ -293,9 +299,10 @@ describe('auth_forms', () => {
293299
294300 await createAuthFormWithFallback ( ) ;
295301
296- // Expect to warn about strategy failure but not log error message for non-Error objects
297- expect ( mockConsoleWarn ) . toHaveBeenCalled ( ) ;
298- expect ( mockConsoleWarn ) . not . toHaveBeenCalledWith ( 'Error:' , expect . anything ( ) ) ;
302+ expect ( mockConsoleWarn ) . toHaveBeenCalledWith (
303+ 'Create authForm strategy: Failed to (Basic case) Use standard superValidate' ,
304+ ) ;
305+ expect ( mockConsoleWarn ) . toHaveBeenCalledWith ( 'String error' ) ;
299306 } ) ;
300307 } ) ;
301308
You can’t perform that action at this time.
0 commit comments