Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(async function () {
this.timeout(60 * 1000);
const options = settings;
options["online-mode"]=false;
options["port"]=25566;
options["view-distance"]=2;
options["worldFolder"]=undefined;
serv=mcServer.createMCServer(options);
await once(serv,"listening");
bot = mineflayer.createBot({
host: "localhost",
port: 25566,
username: "bot",
version: "1.8"
});
bot2 = mineflayer.createBot({
host: "localhost",
port: 25566,
username: "bot2",
version: "1.8"
});
await Promise.all([once(bot,'login'),once(bot2,'login')]);