import{Vector3}from'three'import{EtherealEngineBot}from'@ir-engine/ir-bot/src/bot'import{BotHooks}from'@ir-engine/ir-bot/src/bot/enums/BotHooks'constmaxTimeout=10*1000constbot=newEtherealEngineBot({name: 'bot-1',headless: false,verbose: false})constvector3=newVector3()constdomain=process.env.APP_HOSTconstlocationName='test'constsqrt2=Math.sqrt(2)describe('My Bot Tests',()=>{beforeAll(async()=>{awaitbot.launchBrowser()awaitbot.enterLocation(`https://${domain}/location/${locationName}`)awaitbot.delay(1000)awaitbot.runHook(BotHooks.InitializeBot)},maxTimeout)afterAll(async()=>{awaitbot.delay(1000)awaitbot.quit()},maxTimeout)test('Can spawn in the world',async()=>{expect(vector3.copy(awaitbot.runHook(BotHooks.GetPlayerPosition)).length()).toBeLessThan(sqrt2*2)// sqrt2 * 2 is the default size of our spawn area})})Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on May 14, 2025. It is now read-only.
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Latest commit | ||||