mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-05-18 12:02:53 +02:00
fix(cli): remove duplicate solutions to test
This commit is contained in:
@ -114,6 +114,15 @@ export class GitAffected implements GitAffectedOptions {
|
|||||||
solutions.push(...solutionsByChallenge)
|
solutions.push(...solutionsByChallenge)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return solutions
|
const solutionsUnique: Solution[] = []
|
||||||
|
for (const solution of solutions) {
|
||||||
|
const isAlreadyIncluded = solutionsUnique.some((solutionUnique) => {
|
||||||
|
return solutionUnique.path === solution.path
|
||||||
|
})
|
||||||
|
if (!isAlreadyIncluded) {
|
||||||
|
solutionsUnique.push(solution)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return solutionsUnique
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user