feat: add snapshot tests for eventsub messages (#5965)
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"input": {
|
||||
"banned_at": "2023-05-20T12:30:55.518375571Z",
|
||||
"broadcaster_user_id": "11148817",
|
||||
"broadcaster_user_login": "pajlada",
|
||||
"broadcaster_user_name": "pajlada",
|
||||
"ends_at": null,
|
||||
"is_permanent": true,
|
||||
"moderator_user_id": "29024944",
|
||||
"moderator_user_login": "CLIModerator",
|
||||
"moderator_user_name": "CLIModerator",
|
||||
"reason": "This is a test event",
|
||||
"user_id": "40389552",
|
||||
"user_login": "testFromUser",
|
||||
"user_name": "testFromUser"
|
||||
},
|
||||
"output": [
|
||||
{
|
||||
"badgeInfos": {
|
||||
},
|
||||
"badges": [
|
||||
],
|
||||
"channelName": "",
|
||||
"count": 1,
|
||||
"displayName": "",
|
||||
"elements": [
|
||||
{
|
||||
"element": {
|
||||
"color": "System",
|
||||
"flags": "Timestamp",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"0:00"
|
||||
]
|
||||
},
|
||||
"flags": "Timestamp",
|
||||
"format": "",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"time": "00:00:00",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TimestampElement"
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "UserInfo",
|
||||
"value": "CLIModerator"
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"CLIModerator"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"banned"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "UserInfo",
|
||||
"value": "testFromUser"
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"testFromUser:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"\"This",
|
||||
"is",
|
||||
"a",
|
||||
"test",
|
||||
"event\"."
|
||||
]
|
||||
}
|
||||
],
|
||||
"flags": "System|Timeout|PubSub",
|
||||
"id": "",
|
||||
"localizedName": "",
|
||||
"loginName": "CLIModerator",
|
||||
"messageText": "CLIModerator banned testFromUser: \"This is a test event\". ",
|
||||
"searchText": "CLIModerator banned testFromUser: \"This is a test event\". ",
|
||||
"serverReceivedTime": "1970-01-01T00:00:00Z",
|
||||
"timeoutUser": "testFromUser",
|
||||
"userID": "",
|
||||
"usernameColor": "#ff000000"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"input": {
|
||||
"banned_at": "2023-05-20T12:30:55.518375571Z",
|
||||
"broadcaster_user_id": "11148817",
|
||||
"broadcaster_user_login": "pajlada",
|
||||
"broadcaster_user_name": "pajlada",
|
||||
"ends_at": "2023-05-20T12:40:55.518375571Z",
|
||||
"is_permanent": false,
|
||||
"moderator_user_id": "29024944",
|
||||
"moderator_user_login": "CLIModerator",
|
||||
"moderator_user_name": "CLIModerator",
|
||||
"reason": "This is a test event",
|
||||
"user_id": "40389552",
|
||||
"user_login": "testFromUser",
|
||||
"user_name": "testFromUser"
|
||||
},
|
||||
"output": [
|
||||
{
|
||||
"badgeInfos": {
|
||||
},
|
||||
"badges": [
|
||||
],
|
||||
"channelName": "",
|
||||
"count": 1,
|
||||
"displayName": "",
|
||||
"elements": [
|
||||
{
|
||||
"element": {
|
||||
"color": "System",
|
||||
"flags": "Timestamp",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"0:00"
|
||||
]
|
||||
},
|
||||
"flags": "Timestamp",
|
||||
"format": "",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"time": "00:00:00",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TimestampElement"
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "UserInfo",
|
||||
"value": "CLIModerator"
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"CLIModerator"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"timed",
|
||||
"out"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "UserInfo",
|
||||
"value": "testFromUser"
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"testFromUser"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"for",
|
||||
"10m:",
|
||||
"\"This",
|
||||
"is",
|
||||
"a",
|
||||
"test",
|
||||
"event\"."
|
||||
]
|
||||
}
|
||||
],
|
||||
"flags": "System|Timeout|PubSub",
|
||||
"id": "",
|
||||
"localizedName": "",
|
||||
"loginName": "CLIModerator",
|
||||
"messageText": "CLIModerator timed out testFromUser for 10m: \"This is a test event\". ",
|
||||
"searchText": "CLIModerator timed out testFromUser for 10m: \"This is a test event\". ",
|
||||
"serverReceivedTime": "1970-01-01T00:00:00Z",
|
||||
"timeoutUser": "testFromUser",
|
||||
"userID": "",
|
||||
"usernameColor": "#ff000000"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
{
|
||||
"input": {
|
||||
"action": "warn",
|
||||
"automod_terms": null,
|
||||
"ban": null,
|
||||
"broadcaster_user_id": "11148817",
|
||||
"broadcaster_user_login": "pajlada",
|
||||
"broadcaster_user_name": "pajlada",
|
||||
"delete": null,
|
||||
"followers": null,
|
||||
"moderator_user_id": "424596340",
|
||||
"moderator_user_login": "quotrok",
|
||||
"moderator_user_name": "quotrok",
|
||||
"raid": null,
|
||||
"shared_chat_ban": null,
|
||||
"shared_chat_delete": null,
|
||||
"shared_chat_timeout": null,
|
||||
"shared_chat_unban": null,
|
||||
"shared_chat_untimeout": null,
|
||||
"slow": null,
|
||||
"source_broadcaster_user_id": "41292030",
|
||||
"source_broadcaster_user_login": "adflynn404",
|
||||
"source_broadcaster_user_name": "adflynn404",
|
||||
"timeout": null,
|
||||
"unban": null,
|
||||
"unban_request": null,
|
||||
"unmod": null,
|
||||
"unraid": null,
|
||||
"untimeout": null,
|
||||
"unvip": null,
|
||||
"vip": null,
|
||||
"warn": {
|
||||
"chat_rules_cited": null,
|
||||
"reason": "cut it out",
|
||||
"user_id": "141981764",
|
||||
"user_login": "twitchdev",
|
||||
"user_name": "TwitchDev"
|
||||
}
|
||||
},
|
||||
"output": [
|
||||
{
|
||||
"badgeInfos": {
|
||||
},
|
||||
"badges": [
|
||||
],
|
||||
"channelName": "",
|
||||
"count": 1,
|
||||
"displayName": "",
|
||||
"elements": [
|
||||
{
|
||||
"element": {
|
||||
"color": "System",
|
||||
"flags": "Timestamp",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"0:00"
|
||||
]
|
||||
},
|
||||
"flags": "Timestamp",
|
||||
"format": "",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"time": "00:00:00",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TimestampElement"
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"fallbackColor": "System",
|
||||
"flags": "Text|Mention",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "MentionElement",
|
||||
"userColor": "System",
|
||||
"userLoginName": "quotrok",
|
||||
"words": [
|
||||
"quotrok"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"has",
|
||||
"warned"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"fallbackColor": "System",
|
||||
"flags": "Text|Mention",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": false,
|
||||
"type": "MentionElement",
|
||||
"userColor": "System",
|
||||
"userLoginName": "twitchdev",
|
||||
"words": [
|
||||
"TwitchDev"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
":"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"cut",
|
||||
"it",
|
||||
"out"
|
||||
]
|
||||
}
|
||||
],
|
||||
"flags": "System|Timeout",
|
||||
"id": "",
|
||||
"localizedName": "",
|
||||
"loginName": "quotrok",
|
||||
"messageText": "quotrok has warned twitchdev: cut it out ",
|
||||
"searchText": "quotrok has warned twitchdev: cut it out ",
|
||||
"serverReceivedTime": "1970-01-01T00:00:00Z",
|
||||
"timeoutUser": "",
|
||||
"userID": "",
|
||||
"usernameColor": "#ff000000"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
{
|
||||
"input": {
|
||||
"action": "warn",
|
||||
"automod_terms": null,
|
||||
"ban": null,
|
||||
"broadcaster_user_id": "11148817",
|
||||
"broadcaster_user_login": "pajlada",
|
||||
"broadcaster_user_name": "pajlada",
|
||||
"delete": null,
|
||||
"followers": null,
|
||||
"moderator_user_id": "424596340",
|
||||
"moderator_user_login": "quotrok",
|
||||
"moderator_user_name": "quotrok",
|
||||
"raid": null,
|
||||
"shared_chat_ban": null,
|
||||
"shared_chat_delete": null,
|
||||
"shared_chat_timeout": null,
|
||||
"shared_chat_unban": null,
|
||||
"shared_chat_untimeout": null,
|
||||
"slow": null,
|
||||
"source_broadcaster_user_id": "11148817",
|
||||
"source_broadcaster_user_login": "pajlada",
|
||||
"source_broadcaster_user_name": "pajlada",
|
||||
"timeout": null,
|
||||
"unban": null,
|
||||
"unban_request": null,
|
||||
"unmod": null,
|
||||
"unraid": null,
|
||||
"untimeout": null,
|
||||
"unvip": null,
|
||||
"vip": null,
|
||||
"warn": {
|
||||
"chat_rules_cited": null,
|
||||
"reason": "cut it out",
|
||||
"user_id": "141981764",
|
||||
"user_login": "twitchdev",
|
||||
"user_name": "TwitchDev"
|
||||
}
|
||||
},
|
||||
"output": [
|
||||
{
|
||||
"badgeInfos": {
|
||||
},
|
||||
"badges": [
|
||||
],
|
||||
"channelName": "",
|
||||
"count": 1,
|
||||
"displayName": "",
|
||||
"elements": [
|
||||
{
|
||||
"element": {
|
||||
"color": "System",
|
||||
"flags": "Timestamp",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"0:00"
|
||||
]
|
||||
},
|
||||
"flags": "Timestamp",
|
||||
"format": "",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"time": "00:00:00",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TimestampElement"
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"fallbackColor": "System",
|
||||
"flags": "Text|Mention",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "MentionElement",
|
||||
"userColor": "System",
|
||||
"userLoginName": "quotrok",
|
||||
"words": [
|
||||
"quotrok"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"has",
|
||||
"warned"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"fallbackColor": "System",
|
||||
"flags": "Text|Mention",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": false,
|
||||
"type": "MentionElement",
|
||||
"userColor": "System",
|
||||
"userLoginName": "twitchdev",
|
||||
"words": [
|
||||
"TwitchDev"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
":"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"cut",
|
||||
"it",
|
||||
"out"
|
||||
]
|
||||
}
|
||||
],
|
||||
"flags": "System|Timeout",
|
||||
"id": "",
|
||||
"localizedName": "",
|
||||
"loginName": "quotrok",
|
||||
"messageText": "quotrok has warned twitchdev: cut it out ",
|
||||
"searchText": "quotrok has warned twitchdev: cut it out ",
|
||||
"serverReceivedTime": "1970-01-01T00:00:00Z",
|
||||
"timeoutUser": "",
|
||||
"userID": "",
|
||||
"usernameColor": "#ff000000"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user