All checks were successful
discord bot tests / discord bot tests (push) Successful in 11s
17 lines
No EOL
429 B
JavaScript
17 lines
No EOL
429 B
JavaScript
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);
|
|
|
|
}
|
|
}) |