@@ -259,10 +259,10 @@ describe('AI client branch coverage', () => {
259259 title : 'Source A' ,
260260 content : 'A content' ,
261261 type : 'url' ,
262- origin : 'https://a.com' ,
262+ origin : 'https://a.com/ ' ,
263263 folder : 'Auto-saved' ,
264264 isActive : true ,
265- metadata : expect . objectContaining ( { capturedVia : 'generate' , url : 'https://a.com' } ) ,
265+ metadata : expect . objectContaining ( { capturedVia : 'generate' , url : 'https://a.com/ ' } ) ,
266266 } ) ;
267267 } ) ;
268268
@@ -311,6 +311,7 @@ describe('AI client branch coverage', () => {
311311 qualityLabel : 'unknown' ,
312312 query : 42 ,
313313 } ,
314+ { title : 'Protocol-less source' , url : 'example.com/source-two' } ,
314315 { title : '' , url : 'https://example.com/rejected' } ,
315316 { title : 'Unsafe protocol' , url : 'httpx://example.com/rejected' } ,
316317 ] ,
@@ -322,6 +323,7 @@ describe('AI client branch coverage', () => {
322323
323324 expect ( outcome . discoveredSources ) . toEqual ( [
324325 { title : 'Source with malformed metadata' , url : 'https://example.com/source' } ,
326+ { title : 'Protocol-less source' , url : 'https://example.com/source-two' } ,
325327 ] ) ;
326328 expect ( addSourceMock ) . toHaveBeenCalledWith ( expect . objectContaining ( {
327329 title : 'Source with malformed metadata' ,
@@ -428,10 +430,10 @@ describe('AI client branch coverage', () => {
428430 title : 'Source C' ,
429431 content : 'C content' ,
430432 type : 'url' ,
431- origin : 'https://c.com' ,
433+ origin : 'https://c.com/ ' ,
432434 folder : 'Auto-saved' ,
433435 isActive : true ,
434- metadata : expect . objectContaining ( { capturedVia : 'brainstorm' , url : 'https://c.com' } ) ,
436+ metadata : expect . objectContaining ( { capturedVia : 'brainstorm' , url : 'https://c.com/ ' } ) ,
435437 } ) ;
436438 } ) ;
437439
0 commit comments