CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PrismarineJS

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: PrismarineJS/mineflayer
Path: blob/master/test/externalTests/rain.js
Views: 789
1
const assert = require('assert')
2
const { once } = require('../../lib/promise_utils')
3
4
module.exports = () => async (bot) => {
5
bot.test.sayEverywhere('/weather clear')
6
await bot.test.wait(1000)
7
bot.test.sayEverywhere('/weather rain')
8
9
await once(bot, 'rain')
10
assert.strictEqual(bot.isRaining, true)
11
bot.test.sayEverywhere('/weather clear')
12
13
await once(bot, 'rain')
14
assert.strictEqual(bot.isRaining, false)
15
}
16
17