@@ -276,41 +276,6 @@ describe('detectJsonLogs', () => {
276276 expect ( detectJsonLogs ( logs ) ) . toBe ( true ) ;
277277 } ) ;
278278
279- test ( 'should only check first 20 non-empty lines' , ( ) => {
280- const logs = [
281- '{"timestamp":"2025-11-18T10:00:00Z","level":"info","message":"Line 1"}' ,
282- '{"timestamp":"2025-11-18T10:00:01Z","level":"info","message":"Line 2"}' ,
283- '{"timestamp":"2025-11-18T10:00:02Z","level":"info","message":"Line 3"}' ,
284- '{"timestamp":"2025-11-18T10:00:03Z","level":"info","message":"Line 4"}' ,
285- '{"timestamp":"2025-11-18T10:00:04Z","level":"info","message":"Line 5"}' ,
286- '{"timestamp":"2025-11-18T10:00:05Z","level":"info","message":"Line 6"}' ,
287- '{"timestamp":"2025-11-18T10:00:06Z","level":"info","message":"Line 7"}' ,
288- '{"timestamp":"2025-11-18T10:00:07Z","level":"info","message":"Line 8"}' ,
289- '{"timestamp":"2025-11-18T10:00:08Z","level":"info","message":"Line 9"}' ,
290- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 11"}' ,
291- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 12"}' ,
292- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 13"}' ,
293- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 14"}' ,
294- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 15"}' ,
295- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 16"}' ,
296- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 17"}' ,
297- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 18"}' ,
298- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 19"}' ,
299- '{"timestamp":"2025-11-18T10:00:09Z","level":"info","message":"Line 20"}' ,
300- // These lines after the 20th should be ignored
301- 'Not JSON line 1' ,
302- 'Not JSON line 2' ,
303- 'Not JSON line 3' ,
304- 'Not JSON line 4' ,
305- 'Not JSON line 5' ,
306- 'Not JSON line 6' ,
307- 'Not JSON line 7' ,
308- 'Not JSON line 8' ,
309- ] ;
310-
311- expect ( detectJsonLogs ( logs ) ) . toBe ( true ) ;
312- } ) ;
313-
314279 test ( 'should detect JSON with nested objects' , ( ) => {
315280 const logs = [
316281 '{"user":{"id":123,"name":"John"},"action":"login"}' ,
0 commit comments