Add account based multiplayer hosting and bug report retention
This commit is contained in:
@@ -49,22 +49,33 @@ test("room limits include the owner and stay between 2 and 16", () => {
|
||||
createRoomSchema.parse({
|
||||
datasetId: map,
|
||||
difficulty: "normal",
|
||||
displayName: " Alex ",
|
||||
playerLimit,
|
||||
}).displayName,
|
||||
"Alex",
|
||||
}).playerLimit,
|
||||
playerLimit,
|
||||
);
|
||||
for (const playerLimit of [1, 17, 2.5, "16", null])
|
||||
assert.equal(
|
||||
createRoomSchema.safeParse({
|
||||
datasetId: map,
|
||||
difficulty: "normal",
|
||||
displayName: "Alex",
|
||||
playerLimit,
|
||||
}).success,
|
||||
false,
|
||||
);
|
||||
});
|
||||
test("party creation rejects a client-selected host identity", () => {
|
||||
const room = { datasetId: map, difficulty: "normal", playerLimit: 4 };
|
||||
assert.equal(createRoomSchema.safeParse(room).success, true);
|
||||
for (const identity of [
|
||||
{ displayName: "Impostor" },
|
||||
{ accountId: map },
|
||||
{ name: "Impostor" },
|
||||
])
|
||||
assert.equal(
|
||||
createRoomSchema.safeParse({ ...room, ...identity }).success,
|
||||
false,
|
||||
);
|
||||
});
|
||||
test("multiplayer names and guesses reject hidden controls, invalid rounds, and non-finite positions", () => {
|
||||
assert.equal(
|
||||
joinRoomSchema.parse({ displayName: " Друг " }).displayName,
|
||||
|
||||
Reference in New Issue
Block a user