import assert from "node:assert/strict"; import test from "node:test"; import { resolveAuctionErrorMessage, resolveAuctionRejectionMessage, } from "../src/api/auctionRejectionMessages.ts"; const rosterMessage = "팀 배정 상태를 확인해야 해 경매를 완료하지 못했습니다."; test("shows the common error message when roster validation blocks completion", () => { assert.equal( resolveAuctionRejectionMessage({ auctionRejectionReason: "AUCTION_TRANSITION_REJECTED_BECAUSE_ROSTER_INVALID", code: "AUCTION_ROSTER_INVALID", message: "Auction roster validation failed.", }), rosterMessage, ); }); test("shows the same roster message for the socket error event", () => { assert.equal( resolveAuctionErrorMessage("Auction roster validation failed."), rosterMessage, ); });