fix(test): add groupName to GroupMessage test fixtures (#212 CI)

core's typecheck covers its own tests (protocol/onebot typecheck src
only), so the newly-required GroupMessage.groupName field failed the
Dev Build typecheck on test fixtures that construct group_message
events. Add groupName to every such fixture across core/onebot/protocol
tests.
This commit is contained in:
DrSmoothl committed 2026-07-09 19:18:09 +08:00
1 parent 9b470d0412
commit 5e73d69663
6 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ function makeFriendMessage(): FriendMessage {
function makeGroupMessage(): GroupMessage {
return {
kind: 'group_message',
kind: 'group_message', groupName: '',
time: 1700000000,
selfUin: 10001,
groupId: 99999,
@@ -18,7 +18,7 @@ const mockFetch = vi.mocked(fetchGroupMessageRange);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function gm(seq: number): any {
return {
kind: 'group_message', time: 0, selfUin: 0, senderUin: 1, msgSeq: seq,
kind: 'group_message', groupName: '', time: 0, selfUin: 0, senderUin: 1, msgSeq: seq,
msgId: seq, elements: [], groupId: 9999, senderNick: '', senderCard: '', senderRole: '',
};
}