@@ -267,3 +267,50 @@ test('"dependencies" returns dependency hell', () => {
267267 const repo = buildRepo ( { lastCommitMessage : 'update dependencies' , lastCommitDate : new Date ( ) . toISOString ( ) } )
268268 assert . equal ( generateLastWords ( repo ) , 'trapped in dependency hell' )
269269} )
270+
271+ // ── language-specific causes ───────────────────────────────────────
272+
273+ test ( 'Ruby repo idle >365 days → Gemfile quip' , ( ) => {
274+ const repo = buildRepo ( {
275+ language : 'Ruby' ,
276+ lastCommitDate : '2023-01-01T00:00:00.000Z' ,
277+ isArchived : false ,
278+ isFork : false ,
279+ openIssuesCount : 2 ,
280+ stargazersCount : 5 ,
281+ forksCount : 0 ,
282+ description : 'a gem that time forgot' ,
283+ } )
284+ const cause = determineCauseOfDeath ( repo )
285+ assert . equal ( cause , 'Gemfile.lock never unlocked' )
286+ } )
287+
288+ test ( 'Perl repo returns Perl-specific cause' , ( ) => {
289+ const repo = buildRepo ( {
290+ language : 'Perl' ,
291+ lastCommitDate : '2024-01-01T00:00:00.000Z' ,
292+ isArchived : false ,
293+ isFork : false ,
294+ openIssuesCount : 2 ,
295+ stargazersCount : 5 ,
296+ forksCount : 0 ,
297+ description : 'a Perl tool' ,
298+ } )
299+ const cause = determineCauseOfDeath ( repo )
300+ assert . equal ( cause , 'Nobody could read it, including the author' )
301+ } )
302+
303+ test ( 'Objective-C repo idle >365 days returns Swift quip' , ( ) => {
304+ const repo = buildRepo ( {
305+ language : 'Objective-C' ,
306+ lastCommitDate : '2022-01-01T00:00:00.000Z' ,
307+ isArchived : false ,
308+ isFork : false ,
309+ openIssuesCount : 2 ,
310+ stargazersCount : 5 ,
311+ forksCount : 0 ,
312+ description : 'an old iOS lib' ,
313+ } )
314+ const cause = determineCauseOfDeath ( repo )
315+ assert . equal ( cause , 'Swift happened' )
316+ } )
0 commit comments