fix(auction): prevent skipped players and incomplete completion
This commit is contained in:
1 parent
de84ad5309
commit
5bc748dc4d
10 files changed
+677
-32
No files matched your search
@@ -0,0 +1,27 @@
|
||||
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,
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user