advancements in tests

This commit is contained in:
grimhilt
2023-04-04 18:00:27 +02:00
parent 5a71e104cd
commit 9fc31f8686
5 changed files with 132 additions and 36 deletions

View File

@@ -7,3 +7,10 @@ export function removeDuplicates(array: []) {
}
return unique;
}
export function hasSameElements(a1: any[], a2: any[]) {
return (
a1.length == a2.length &&
a1.reduce((a, b) => a && a2.includes(b), true)
);
}