Remove duplicate code
This commit is contained in:
@@ -5,10 +5,7 @@
|
||||
import { assertEquals } from "@std/assert";
|
||||
import { ATTRIBUTES } from "$/server/game/entity/attributes.ts";
|
||||
import { PLAYER_MENU_EXTRA } from "$/common/protocol.ts";
|
||||
import { test_game } from "./helpers.ts";
|
||||
|
||||
// deno-lint-ignore no-explicit-any
|
||||
type Msg = any;
|
||||
import { container_items, test_game } from "./helpers.ts";
|
||||
|
||||
async function setup() {
|
||||
const t = await test_game("mods");
|
||||
@@ -39,7 +36,7 @@ Deno.test("the power glove and feral claws go in the hands slot, and only work w
|
||||
Deno.test("worn artifacts work again after rejoining, and say what they do", async () => {
|
||||
const t = await setup();
|
||||
t.send(1, { type: "click", menu: 0, slot: 0, button: 0, shift: true });
|
||||
const worn = t.take(1).findLast((m: Msg) => m.type === "container" && m.container === "extra").items;
|
||||
const worn = container_items(t.take(1), "extra");
|
||||
assertEquals(worn[t.hands - PLAYER_MENU_EXTRA].lore, "When worn:\n+4 Attack Damage");
|
||||
|
||||
t.game.on_disconnect(1);
|
||||
|
||||
Reference in New Issue
Block a user