diff --git a/tests/getGuildCount.test.js b/tests/getGuildCount.test.js new file mode 100644 index 0000000..fac0cd1 --- /dev/null +++ b/tests/getGuildCount.test.js @@ -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); + + } +}) \ No newline at end of file