Appearance
Summary
Clear
- Method:
clear() - Return:
void - Usage:
Clear caches. Use it after the end of each test
ts
import { clear } from '@rpgjs/testing'
import { afterEach } from 'vitest'
afterEach(() => {
clear()
})Next Tick
- Method:
nextTick(client,timestamp?) - Arguments:
- {
RpgClientEngine}client. (Optional:false) - {
number}timestamp. A predefined timestamp (Optional:true)
- {
- Return:
Promise - Usage:
Allows you to make a tick:
- on server
- server sends data to client
- Client retrieves data and performs inputs (move, etc.) and server reconciliation
- A tick is performed on the client
- A tick is performed on VueJS
Wait a moment
- Since: 4.0.0
- Method:
waitUntil(promise) - Arguments:
- {
Promise}promise. (Optional:false)
- {
- Return:
Promise - Example:
ts
await waitUntil(
player.moveRoutes([Move.right()])
)- Usage: