Skip to content

Commit

Permalink
test: even more tests
Browse files Browse the repository at this point in the history
They might need to run in parallel in CI...
  • Loading branch information
Nerixyz committed Sep 20, 2024
1 parent 1bca556 commit 1f40e7f
Show file tree
Hide file tree
Showing 11 changed files with 1,543 additions and 11 deletions.
228 changes: 228 additions & 0 deletions tests/fixtures/MessageBuilder/IRC/badges-invalid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
{
"input": "@tmi-sent-ts=1726764056444;subscriber=1;id=546c42a6-21d0-4f3d-a6a0-c77f78d7b131;room-id=11148817;user-id=123456;display-name=badgy;badges=subscriber24;badge-info=subscriber/27;color=#FF0000;flags=;user-type=;emotes= :[email protected] PRIVMSG #pajlada :badge",
"output": [
{
"badgeInfos": {
"subscriber": "27"
},
"badges": [
],
"channelName": "pajlada",
"count": 1,
"displayName": "badgy",
"elements": [
{
"color": "System",
"flags": "ChannelName",
"link": {
"type": "JumpToChannel",
"value": "pajlada"
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"#pajlada"
]
},
{
"element": {
"color": "System",
"flags": "Timestamp",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"16:40"
]
},
"flags": "Timestamp",
"format": "",
"link": {
"type": "None",
"value": ""
},
"time": "16:40:56",
"tooltip": "",
"trailingSpace": true,
"type": "TimestampElement"
},
{
"flags": "ModeratorTools",
"link": {
"type": "None",
"value": ""
},
"tooltip": "",
"trailingSpace": true,
"type": "TwitchModerationElement"
},
{
"emote": {
"images": {
"1x": "https://chatterino.com/Chatterino.png"
},
"name": "",
"tooltip": "Chatterino badge"
},
"flags": "BadgeChatterino",
"link": {
"type": "None",
"value": ""
},
"tooltip": "Chatterino badge",
"trailingSpace": true,
"type": "BadgeElement"
},
{
"color": "#0c090a0b",
"emote": {
"images": {
"1x": "https://chatterino.com/FFZ1.png"
},
"name": "",
"tooltip": "FFZ1 badge"
},
"flags": "BadgeFfz",
"link": {
"type": "None",
"value": ""
},
"tooltip": "FFZ1 badge",
"trailingSpace": true,
"type": "FfzBadgeElement"
},
{
"color": "#100d0e0f",
"emote": {
"images": {
"1x": "https://chatterino.com/FFZ2.png"
},
"name": "",
"tooltip": "FFZ2 badge"
},
"flags": "BadgeFfz",
"link": {
"type": "None",
"value": ""
},
"tooltip": "FFZ2 badge",
"trailingSpace": true,
"type": "FfzBadgeElement"
},
{
"color": "#14111213",
"emote": {
"images": {
"1x": "https://chatterino.com/FFZ2.png"
},
"name": "",
"tooltip": "FFZ2 badge"
},
"flags": "BadgeFfz",
"link": {
"type": "None",
"value": ""
},
"tooltip": "FFZ2 badge",
"trailingSpace": true,
"type": "FfzBadgeElement"
},
{
"color": "#18151617",
"emote": {
"images": {
"1x": "https://chatterino.com/FFZ2.png"
},
"name": "",
"tooltip": "FFZ2 badge"
},
"flags": "BadgeFfz",
"link": {
"type": "None",
"value": ""
},
"tooltip": "FFZ2 badge",
"trailingSpace": true,
"type": "FfzBadgeElement"
},
{
"emote": {
"id": "1",
"images": {
"1x": "https://chatterino.com/7tv//1x"
},
"name": "",
"tooltip": "7TV badge"
},
"flags": "BadgeSevenTV",
"link": {
"type": "None",
"value": ""
},
"tooltip": "7TV badge",
"trailingSpace": true,
"type": "BadgeElement"
},
{
"color": "#ffff0000",
"flags": "Username",
"link": {
"type": "UserInfo",
"value": "badgy"
},
"style": "ChatMediumBold",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"badgy:"
]
},
{
"color": "Text",
"flags": "Text",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"badge"
]
},
{
"background": "#ffa0a0a4",
"flags": "ReplyButton",
"link": {
"type": "ReplyToMessage",
"value": "546c42a6-21d0-4f3d-a6a0-c77f78d7b131"
},
"padding": 2,
"tooltip": "",
"trailingSpace": true,
"type": "CircularImageElement",
"url": ""
}
],
"flags": "Collapsed",
"id": "546c42a6-21d0-4f3d-a6a0-c77f78d7b131",
"localizedName": "",
"loginName": "badgy",
"messageText": "badge",
"searchText": "badgy badgy: badge ",
"serverReceivedTime": "2024-09-19T16:40:56Z",
"timeoutUser": "",
"usernameColor": "#ffff0000"
}
]
}
34 changes: 25 additions & 9 deletions tests/fixtures/MessageBuilder/IRC/emotes2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"input": "@tmi-sent-ts=1726603573366;subscriber=1;id=56844e02-5541-4b9f-982b-640e6b36f1a9;room-id=11148817;user-id=129546453;display-name=nerixyz;badges=subscriber/24;badge-info=subscriber/27;color=#FF0000;flags=;user-type=;emotes=1902:58-62/25:10-14/305954156:39-46 :[email protected] PRIVMSG #pajlada :BTTVEmote Kappa 7TVEmote 7TVEmote0w πŸ˜‚πŸ˜‚ PogChamp 7TVGlobal Keepo FFZEmote FFZGlobal",
"input": "@tmi-sent-ts=1726868573676;subscriber=1;id=23c8b81c-7c73-44e4-84f1-7d37e99714e4;room-id=11148817;user-id=129546453;display-name=nerixyz;badges=subscriber/24;badge-info=subscriber/27;color=#FF0000;flags=;user-type=;emotes=25:10-14/305954156:50-57/1902:69-73 :[email protected] PRIVMSG #pajlada :BTTVEmote Kappa 7TVEmote 7TVEmote0w 7TVEmote0w πŸ˜‚πŸ˜‚ PogChamp 7TVGlobal Keepo FFZEmote FFZGlobal",
"output": [
{
"badgeInfos": {
Expand Down Expand Up @@ -40,7 +40,7 @@
"trailingSpace": true,
"type": "TextElement",
"words": [
"20:06"
"21:42"
]
},
"flags": "Timestamp",
Expand All @@ -49,7 +49,7 @@
"type": "None",
"value": ""
},
"time": "20:06:13",
"time": "21:42:53",
"tooltip": "",
"trailingSpace": true,
"type": "TimestampElement"
Expand Down Expand Up @@ -162,6 +162,21 @@
},
"flags": "SevenTVEmoteImage|SevenTVEmoteText"
},
{
"emote": {
"author": "Chatterino",
"baseName": "ZeroWidth",
"homePage": "https://chatterino.com/7TVEmote0w",
"id": "2",
"images": {
"1x": "https://chatterino.com/7TVEmote0w.png"
},
"name": "7TVEmote0w",
"tooltip": "7TVEmote0w Tooltip",
"zeroWidth": true
},
"flags": "SevenTVEmoteImage|SevenTVEmoteText"
},
{
"emote": {
"author": "Chatterino",
Expand Down Expand Up @@ -196,11 +211,12 @@
"type": "TextElement",
"words": [
"7TVEmote",
"7TVEmote0w",
"7TVEmote0w"
]
},
"textElementColor": "Text",
"tooltip": "7TVEmote 7TVEmote0w",
"tooltip": "7TVEmote 7TVEmote0w 7TVEmote0w",
"tooltips": [
],
"trailingSpace": true,
Expand Down Expand Up @@ -446,7 +462,7 @@
"flags": "ReplyButton",
"link": {
"type": "ReplyToMessage",
"value": "56844e02-5541-4b9f-982b-640e6b36f1a9"
"value": "23c8b81c-7c73-44e4-84f1-7d37e99714e4"
},
"padding": 2,
"tooltip": "",
Expand All @@ -456,12 +472,12 @@
}
],
"flags": "Collapsed",
"id": "56844e02-5541-4b9f-982b-640e6b36f1a9",
"id": "23c8b81c-7c73-44e4-84f1-7d37e99714e4",
"localizedName": "",
"loginName": "nerixyz",
"messageText": "BTTVEmote Kappa 7TVEmote 7TVEmote0w πŸ˜‚πŸ˜‚ PogChamp 7TVGlobal Keepo FFZEmote FFZGlobal",
"searchText": "nerixyz nerixyz: BTTVEmote Kappa 7TVEmote 7TVEmote0w πŸ˜‚πŸ˜‚ PogChamp 7TVGlobal Keepo FFZEmote FFZGlobal ",
"serverReceivedTime": "2024-09-17T20:06:13Z",
"messageText": "BTTVEmote Kappa 7TVEmote 7TVEmote0w 7TVEmote0w πŸ˜‚πŸ˜‚ PogChamp 7TVGlobal Keepo FFZEmote FFZGlobal",
"searchText": "nerixyz nerixyz: BTTVEmote Kappa 7TVEmote 7TVEmote0w 7TVEmote0w πŸ˜‚πŸ˜‚ PogChamp 7TVGlobal Keepo FFZEmote FFZGlobal ",
"serverReceivedTime": "2024-09-20T21:42:53Z",
"timeoutUser": "",
"usernameColor": "#ffff0000"
}
Expand Down
Loading

0 comments on commit 1f40e7f

Please sign in to comment.