mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2024-12-08 00:45:29 +01:00
fix(cli): remove duplicate solutions to test
This commit is contained in:
parent
6d30c3defe
commit
88acd8cfef
@ -114,6 +114,15 @@ export class GitAffected implements GitAffectedOptions {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user