import { Vector3 } from 'three'
import { EtherealEngineBot } from 'ee-bot/src/bot'
import { BotHooks } from 'ee-bot/src/bot/enums/BotHooks'
const maxTimeout = 10 * 1000
const bot = new EtherealEngineBot({ name: 'bot-1', headless: false, verbose: false })
const vector3 = new Vector3()
const domain = process.env.APP_HOST
const locationName = 'test'
const sqrt2 = Math.sqrt(2)
describe('My Bot Tests', () => {
beforeAll(async () => {
await bot.launchBrowser()
await bot.enterLocation(`https://${domain}/location/${locationName}`)
await bot.delay(1000)
await bot.runHook(BotHooks.InitializeBot)
}, maxTimeout)
afterAll(async () => {
await bot.delay(1000)
await bot.quit()
}, maxTimeout)
test('Can spawn in the world', async () => {
expect(
vector3.copy(await bot.runHook(BotHooks.GetPlayerPosition)).length()
).toBeLessThan(sqrt2 * 2) // sqrt2 * 2 is the default size of our spawn area
})
})
forked from EtherealEngine/ee-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
The official AI enabled bot for XREngine built on puppeteer.
License
MoizAdnan/ee-bot-test
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
The official AI enabled bot for XREngine built on puppeteer.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- JavaScript 73.5%
- TypeScript 26.0%
- Shell 0.5%