Add test for getGuildCount
All checks were successful
discord bot tests / discord bot tests (push) Successful in 11s

This commit is contained in:
SileNce5k 2024-10-25 22:10:03 +02:00
parent 7179260cff
commit ee6debb715
Signed by: SileNce
GPG key ID: B0A142BB4291B204

View file

@ -0,0 +1,17 @@
const getGuildCount = require('../util/getGuildCount');
test("Testing getGuildCount", () => {
for(let i = 1; i < 200000; i = i+i*30 ){
let client = {guilds: {cache: new Map()}}
client.guilds.cache.each = client.guilds.cache.forEach;
for(let j = 0; j < i; j++){
client.guilds.cache.set(`num: ${j}`, j);
}
expect(getGuildCount(client)).toBe(i);
}
})