Expand scene document validation tests to cover more player start movement capabilities
This commit is contained in:
@@ -124,6 +124,19 @@ describe("validateSceneDocument", () => {
|
|||||||
jump: "yes",
|
jump: "yes",
|
||||||
sprint: 1,
|
sprint: 1,
|
||||||
crouch: null
|
crouch: null
|
||||||
|
},
|
||||||
|
jump: {
|
||||||
|
speed: 0,
|
||||||
|
bufferMs: -1,
|
||||||
|
coyoteTimeMs: -1,
|
||||||
|
variableHeight: "yes",
|
||||||
|
maxHoldMs: 0
|
||||||
|
},
|
||||||
|
sprint: {
|
||||||
|
speedMultiplier: 0
|
||||||
|
},
|
||||||
|
crouch: {
|
||||||
|
speedMultiplier: 0
|
||||||
}
|
}
|
||||||
} as unknown as ReturnType<typeof createPlayerStartEntity>["movementTemplate"],
|
} as unknown as ReturnType<typeof createPlayerStartEntity>["movementTemplate"],
|
||||||
inputBindings: {
|
inputBindings: {
|
||||||
@@ -181,6 +194,27 @@ describe("validateSceneDocument", () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
code: "invalid-player-start-crouch-capability"
|
code: "invalid-player-start-crouch-capability"
|
||||||
}),
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
code: "invalid-player-start-jump-speed"
|
||||||
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
code: "invalid-player-start-jump-buffer-ms"
|
||||||
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
code: "invalid-player-start-coyote-time-ms"
|
||||||
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
code: "invalid-player-start-variable-jump-height"
|
||||||
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
code: "invalid-player-start-variable-jump-max-hold-ms"
|
||||||
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
code: "invalid-player-start-sprint-speed-multiplier"
|
||||||
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
code: "invalid-player-start-crouch-speed-multiplier"
|
||||||
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
code: "invalid-player-start-jump-keyboard-binding"
|
code: "invalid-player-start-jump-keyboard-binding"
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user