@mkody/twitch-emoticons 2.8.1 → 2.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/TwitchEmoticons.min.js +22 -0
  2. package/dist/TwitchEmoticons.min.js.map +7 -0
  3. package/docs/BTTVEmote.html +1 -111
  4. package/docs/Channel.html +4 -4
  5. package/docs/Collection.html +1 -1
  6. package/docs/Emote.html +2 -107
  7. package/docs/EmoteFetcher.html +1 -1
  8. package/docs/EmoteParser.html +1 -1
  9. package/docs/FFZEmote.html +1 -111
  10. package/docs/SevenTVEmote.html +1 -111
  11. package/docs/TwitchEmote.html +1 -111
  12. package/docs/index.html +2 -2
  13. package/docs/struct_BTTVEmote.js.html +1 -1
  14. package/docs/struct_Channel.js.html +6 -1
  15. package/docs/struct_Emote.js.html +8 -1
  16. package/docs/struct_EmoteFetcher.js.html +2 -2
  17. package/docs/struct_EmoteParser.js.html +1 -1
  18. package/docs/struct_FFZEmote.js.html +1 -1
  19. package/docs/struct_SevenTVEmote.js.html +1 -1
  20. package/docs/struct_TwitchEmote.js.html +1 -1
  21. package/docs/util_Collection.js.html +1 -1
  22. package/jest.config.js +198 -0
  23. package/package.json +12 -8
  24. package/src/struct/Channel.js +5 -0
  25. package/src/struct/Emote.js +7 -0
  26. package/src/struct/EmoteFetcher.js +1 -1
  27. package/test/BTTV.test.js +48 -0
  28. package/test/FFZ.test.js +71 -0
  29. package/test/SevenTV.test.js +70 -0
  30. package/test/ToFromObject.test.js +155 -0
  31. package/test/Twitch.test.js +64 -0
  32. package/test/__snapshots__/ToFromObject.test.js.snap +121 -0
  33. package/test/other.test.js +13 -0
  34. package/typings/index.d.ts +1 -1
  35. package/.github/codeql/codeql-config.yml +0 -5
  36. package/.github/workflows/codeql.yml +0 -50
  37. package/.github/workflows/eslint.yml +0 -51
  38. package/.github/workflows/release.yml +0 -22
  39. package/.github/workflows/yarn-test.yml +0 -17
  40. package/test/index.js +0 -482
@@ -29,7 +29,7 @@
29
29
  <nav >
30
30
 
31
31
 
32
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="BTTVEmote.html#toString">toString</a></li><li data-type='method'><a href="BTTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toObject">toObject</a></li><li data-type='method'><a href="Emote.html#toString">toString</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmoteSet">_getRawFFZEmoteSet</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_setupChannel">_setupChannel</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fromObject">fromObject</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toObject">toObject</a></li><li data-type='method'><a href="FFZEmote.html#toString">toString</a></li><li data-type='method'><a href="FFZEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="SevenTVEmote.html#toString">toString</a></li><li data-type='method'><a href="SevenTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toObject">toObject</a></li><li data-type='method'><a href="TwitchEmote.html#toString">toString</a></li><li data-type='method'><a href="TwitchEmote.html#.fromObject">fromObject</a></li></ul></li></ul>
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="BTTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toObject">toObject</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmoteSet">_getRawFFZEmoteSet</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_setupChannel">_setupChannel</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fromObject">fromObject</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toObject">toObject</a></li><li data-type='method'><a href="FFZEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="SevenTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toObject">toObject</a></li><li data-type='method'><a href="TwitchEmote.html#.fromObject">fromObject</a></li></ul></li></ul>
33
33
 
34
34
  </nav>
35
35
 
@@ -29,7 +29,7 @@
29
29
  <nav >
30
30
 
31
31
 
32
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="BTTVEmote.html#toString">toString</a></li><li data-type='method'><a href="BTTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toObject">toObject</a></li><li data-type='method'><a href="Emote.html#toString">toString</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmoteSet">_getRawFFZEmoteSet</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_setupChannel">_setupChannel</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fromObject">fromObject</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toObject">toObject</a></li><li data-type='method'><a href="FFZEmote.html#toString">toString</a></li><li data-type='method'><a href="FFZEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="SevenTVEmote.html#toString">toString</a></li><li data-type='method'><a href="SevenTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toObject">toObject</a></li><li data-type='method'><a href="TwitchEmote.html#toString">toString</a></li><li data-type='method'><a href="TwitchEmote.html#.fromObject">fromObject</a></li></ul></li></ul>
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="BTTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toObject">toObject</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmoteSet">_getRawFFZEmoteSet</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_setupChannel">_setupChannel</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fromObject">fromObject</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toObject">toObject</a></li><li data-type='method'><a href="FFZEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="SevenTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toObject">toObject</a></li><li data-type='method'><a href="TwitchEmote.html#.fromObject">fromObject</a></li></ul></li></ul>
33
33
 
34
34
  </nav>
35
35
 
@@ -29,7 +29,7 @@
29
29
  <nav >
30
30
 
31
31
 
32
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="BTTVEmote.html#toString">toString</a></li><li data-type='method'><a href="BTTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toObject">toObject</a></li><li data-type='method'><a href="Emote.html#toString">toString</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmoteSet">_getRawFFZEmoteSet</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_setupChannel">_setupChannel</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fromObject">fromObject</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toObject">toObject</a></li><li data-type='method'><a href="FFZEmote.html#toString">toString</a></li><li data-type='method'><a href="FFZEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="SevenTVEmote.html#toString">toString</a></li><li data-type='method'><a href="SevenTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toObject">toObject</a></li><li data-type='method'><a href="TwitchEmote.html#toString">toString</a></li><li data-type='method'><a href="TwitchEmote.html#.fromObject">fromObject</a></li></ul></li></ul>
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="BTTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toObject">toObject</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmoteSet">_getRawFFZEmoteSet</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_setupChannel">_setupChannel</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fromObject">fromObject</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toObject">toObject</a></li><li data-type='method'><a href="FFZEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="SevenTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toObject">toObject</a></li><li data-type='method'><a href="TwitchEmote.html#.fromObject">fromObject</a></li></ul></li></ul>
33
33
 
34
34
  </nav>
35
35
 
package/jest.config.js ADDED
@@ -0,0 +1,198 @@
1
+ /**
2
+ * For a detailed explanation regarding each configuration property, visit:
3
+ * https://jestjs.io/docs/configuration
4
+ */
5
+
6
+ /** @type {import('jest').Config} */
7
+ const config = {
8
+ // All imported modules in your tests should be mocked automatically
9
+ // automock: false,
10
+
11
+ // Stop running tests after `n` failures
12
+ // bail: 0,
13
+
14
+ // The directory where Jest should store its cached dependency information
15
+ // cacheDirectory: undefined,
16
+
17
+ // Automatically clear mock calls, instances, contexts and results before every test
18
+ // clearMocks: false,
19
+
20
+ // Indicates whether the coverage information should be collected while executing the test
21
+ // collectCoverage: false,
22
+
23
+ // An array of glob patterns indicating a set of files for which coverage information should be collected
24
+ collectCoverageFrom: [
25
+ '<rootDir>/src/struct/*.{js,jsx,ts,tsx}'
26
+ ],
27
+
28
+ // The directory where Jest should output its coverage files
29
+ // coverageDirectory: undefined,
30
+
31
+ // An array of regexp pattern strings used to skip coverage collection
32
+ // coveragePathIgnorePatterns: [],
33
+
34
+ // Indicates which provider should be used to instrument code for coverage
35
+ coverageProvider: 'v8',
36
+
37
+ // A list of reporter names that Jest uses when writing coverage reports
38
+ // coverageReporters: [
39
+ // 'json',
40
+ // 'text',
41
+ // 'lcov',
42
+ // 'clover'
43
+ // ],
44
+
45
+ // An object that configures minimum threshold enforcement for coverage results
46
+ // coverageThreshold: undefined,
47
+
48
+ // A path to a custom dependency extractor
49
+ // dependencyExtractor: undefined,
50
+
51
+ // Make calling deprecated APIs throw helpful error messages
52
+ // errorOnDeprecated: false,
53
+
54
+ // The default configuration for fake timers
55
+ // fakeTimers: {
56
+ // 'enableGlobally': false
57
+ // },
58
+
59
+ // Force coverage collection from ignored files using an array of glob patterns
60
+ // forceCoverageMatch: [],
61
+
62
+ // A path to a module which exports an async function that is triggered once before all test suites
63
+ // globalSetup: undefined,
64
+
65
+ // A path to a module which exports an async function that is triggered once after all test suites
66
+ // globalTeardown: undefined,
67
+
68
+ // A set of global variables that need to be available in all test environments
69
+ // globals: {},
70
+
71
+ // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
72
+ // maxWorkers: '50%',
73
+
74
+ // An array of directory names to be searched recursively up from the requiring module's location
75
+ // moduleDirectories: [
76
+ // 'node_modules'
77
+ // ],
78
+
79
+ // An array of file extensions your modules use
80
+ // moduleFileExtensions: [
81
+ // 'js',
82
+ // 'mjs',
83
+ // 'cjs',
84
+ // 'jsx',
85
+ // 'ts',
86
+ // 'tsx',
87
+ // 'json',
88
+ // 'node'
89
+ // ],
90
+
91
+ // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
92
+ // moduleNameMapper: {},
93
+
94
+ // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
95
+ // modulePathIgnorePatterns: [],
96
+
97
+ // Activates notifications for test results
98
+ // notify: false,
99
+
100
+ // An enum that specifies notification mode. Requires { notify: true }
101
+ // notifyMode: 'failure-change',
102
+
103
+ // A preset that is used as a base for Jest's configuration
104
+ // preset: undefined,
105
+
106
+ // Run tests from one or more projects
107
+ // projects: undefined,
108
+
109
+ // Use this configuration option to add custom reporters to Jest
110
+ // reporters: undefined,
111
+
112
+ // Automatically reset mock state before every test
113
+ // resetMocks: false,
114
+
115
+ // Reset the module registry before running each individual test
116
+ // resetModules: false,
117
+
118
+ // A path to a custom resolver
119
+ // resolver: undefined,
120
+
121
+ // Automatically restore mock state and implementation before every test
122
+ // restoreMocks: false,
123
+
124
+ // The root directory that Jest should scan for tests and modules within
125
+ // rootDir: undefined,
126
+
127
+ // A list of paths to directories that Jest should use to search for files in
128
+ roots: [
129
+ '<rootDir>/test'
130
+ ],
131
+
132
+ // Allows you to use a custom runner instead of Jest's default test runner
133
+ // runner: 'jest-runner',
134
+
135
+ // The paths to modules that run some code to configure or set up the testing environment before each test
136
+ // setupFiles: [],
137
+
138
+ // A list of paths to modules that run some code to configure or set up the testing framework before each test
139
+ // setupFilesAfterEnv: [],
140
+
141
+ // The number of seconds after which a test is considered as slow and reported as such in the results.
142
+ // slowTestThreshold: 5,
143
+
144
+ // A list of paths to snapshot serializer modules Jest should use for snapshot testing
145
+ // snapshotSerializers: [],
146
+
147
+ // The test environment that will be used for testing
148
+ // testEnvironment: 'jest-environment-node',
149
+
150
+ // Options that will be passed to the testEnvironment
151
+ // testEnvironmentOptions: {},
152
+
153
+ // Adds a location field to test results
154
+ // testLocationInResults: false,
155
+
156
+ // The glob patterns Jest uses to detect test files
157
+ // testMatch: [
158
+ // '**/__tests__/**/*.[jt]s?(x)'
159
+ // '**/?(*.)+(spec|test).[tj]s?(x)'
160
+ // ],
161
+
162
+ // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
163
+ // testPathIgnorePatterns: [
164
+ // '\\\\node_modules\\\\'
165
+ // ],
166
+
167
+ // The regexp pattern or array of patterns that Jest uses to detect test files
168
+ // testRegex: [],
169
+
170
+ // This option allows the use of a custom results processor
171
+ // testResultsProcessor: undefined,
172
+
173
+ // This option allows use of a custom test runner
174
+ // testRunner: 'jest-circus/runner',
175
+
176
+ // A map from regular expressions to paths to transformers
177
+ // transform: undefined,
178
+
179
+ // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
180
+ // transformIgnorePatterns: [
181
+ // '\\\\node_modules\\\\',
182
+ // '\\.pnp\\.[^\\\\]+$'
183
+ // ],
184
+
185
+ // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
186
+ // unmockedModulePathPatterns: undefined,
187
+
188
+ // Indicates whether each individual test should be reported during the run
189
+ verbose: true
190
+
191
+ // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
192
+ // watchPathIgnorePatterns: [],
193
+
194
+ // Whether to use watchman for file crawling
195
+ // watchman: true
196
+ };
197
+
198
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mkody/twitch-emoticons",
3
- "version": "2.8.1",
3
+ "version": "2.8.3",
4
4
  "description": "Gets Twitch, BTTV, FFZ and 7TV emotes as well as parsing text to emotes!",
5
5
  "main": "src/index.js",
6
6
  "typings": "typings/index.d.ts",
@@ -26,19 +26,23 @@
26
26
  ],
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@twurple/api": "^7.0.1",
30
- "@twurple/auth": "^7.0.1",
31
- "axios": "^1.4.0"
29
+ "@twurple/api": "^7.0.3",
30
+ "@twurple/auth": "^7.0.3",
31
+ "axios": "^1.5.1"
32
32
  },
33
33
  "devDependencies": {
34
- "docdash": "^2.0.1",
35
- "eslint": "^8.45.0",
34
+ "@jest/globals": "^29.7.0",
35
+ "docdash": "^2.0.2",
36
+ "esbuild": "^0.19.4",
37
+ "eslint": "^8.50.0",
38
+ "jest": "^29.7.0",
36
39
  "jsdoc": "^4.0.2"
37
40
  },
38
41
  "scripts": {
39
42
  "docs": "jsdoc --configure .jsdoc.json --verbose",
40
- "test": "node test/index.js",
41
- "lint": "eslint ./src ./test"
43
+ "test": "jest",
44
+ "lint": "eslint ./src ./test",
45
+ "build": "esbuild ./src/index.js --bundle --minify --keep-names --sourcemap --format=esm --outfile=./dist/TwitchEmoticons.min.js"
42
46
  },
43
47
  "repository": {
44
48
  "type": "git",
@@ -27,6 +27,9 @@ class Channel {
27
27
  this.emotes = new Collection();
28
28
  }
29
29
 
30
+ /* There are tests that those are returning Collections, but c8 doesn't get it. */
31
+ /* c8 ignore start */
32
+
30
33
  /**
31
34
  * Fetches the BTTV emotes for this channel.
32
35
  * @returns {Promise<Collection<string, BTTVEmote>>}
@@ -50,6 +53,8 @@ class Channel {
50
53
  fetchSevenTVEmotes() {
51
54
  return this.fetcher.fetchSevenTVEmotes(this.id);
52
55
  }
56
+
57
+ /* c8 ignore end */
53
58
  }
54
59
 
55
60
  module.exports = Channel;
@@ -49,6 +49,12 @@ class Emote {
49
49
  this.code = data.code;
50
50
  }
51
51
 
52
+ /**
53
+ * Gets the image link of the emote.
54
+ * @param {number} size - The size of the image.
55
+ * @returns {string}
56
+ */
57
+ /* c8 ignore next 3*/
52
58
  toLink() {
53
59
  return null;
54
60
  }
@@ -58,6 +64,7 @@ class Emote {
58
64
  * Will give the emote's name.
59
65
  * @returns {string}
60
66
  */
67
+ /* c8 ignore next 3*/
61
68
  toString() {
62
69
  return this.code;
63
70
  }
@@ -267,7 +267,7 @@ class EmoteFetcher {
267
267
  * @param {int} [channel=null] - ID of the channel.
268
268
  * @returns {Promise<Collection<string, FFZEmote>>}
269
269
  */
270
- async fetchFFZEmotes(channel) {
270
+ async fetchFFZEmotes(channel = null) {
271
271
  // Fetch modifier emotes at least once
272
272
  if (!this.ffzModifiersFetched) {
273
273
  this.ffzModifiersFetched = true;
@@ -0,0 +1,48 @@
1
+ const { describe, expect, test } = require('@jest/globals');
2
+ const { EmoteFetcher, EmoteParser, Collection } = require('../src/index.js');
3
+
4
+ describe('Test BTTV emotes', () => {
5
+ describe('Test global emotes', () => {
6
+ const emoteFetcher = new EmoteFetcher();
7
+ const emoteParser = new EmoteParser(emoteFetcher, {
8
+ type: 'markdown',
9
+ match: /:(.+?):/g
10
+ });
11
+
12
+ test('Execute fetchBTTVEmotes without any parameters', async() => {
13
+ expect(await emoteFetcher.fetchBTTVEmotes()).toBeInstanceOf(Collection);
14
+ });
15
+
16
+ test('Get emote (SourPls)', () => {
17
+ const emote = emoteFetcher.emotes.get('SourPls');
18
+ expect(emote.toLink(2)).toBe('https://cdn.betterttv.net/emote/566ca38765dbbdab32ec0560/3x.webp');
19
+ });
20
+
21
+ test('Parse string with emote (SourPls)', () => {
22
+ const text = emoteParser.parse('This is a test string with :SourPls: in it.');
23
+ expect(text).toBe('This is a test string with ![SourPls](https://cdn.betterttv.net/emote/566ca38765dbbdab32ec0560/1x.webp "SourPls") in it.');
24
+ });
25
+ });
26
+
27
+ describe('Test user emotes', () => {
28
+ const emoteFetcher = new EmoteFetcher();
29
+ const emoteParser = new EmoteParser(emoteFetcher, {
30
+ type: 'markdown',
31
+ match: /:(.+?):/g
32
+ });
33
+
34
+ test('Execute fetchBTTVEmotes with user ID', async() => {
35
+ expect(await emoteFetcher.fetchBTTVEmotes(56648155)).toBeInstanceOf(Collection);
36
+ });
37
+
38
+ test('Get emote (tppUrn)', () => {
39
+ const emote = emoteFetcher.emotes.get('tppUrn');
40
+ expect(emote.toLink(2)).toBe('https://cdn.betterttv.net/emote/5f5f7d5f68d9d86c020e8672/3x.webp');
41
+ });
42
+
43
+ test('Parse string with emote (tppUrn)', () => {
44
+ const text = emoteParser.parse('This is a test string with :tppUrn: in it.');
45
+ expect(text).toBe('This is a test string with ![tppUrn](https://cdn.betterttv.net/emote/5f5f7d5f68d9d86c020e8672/1x.webp "tppUrn") in it.');
46
+ });
47
+ });
48
+ });
@@ -0,0 +1,71 @@
1
+ const { describe, expect, test } = require('@jest/globals');
2
+ const { EmoteFetcher, EmoteParser, Collection } = require('../src/index.js');
3
+
4
+ describe('Test FFZ emotes', () => {
5
+ describe('Test global emotes', () => {
6
+ const emoteFetcher = new EmoteFetcher();
7
+ const emoteParser = new EmoteParser(emoteFetcher, {
8
+ type: 'markdown',
9
+ match: /:(.+?):/g
10
+ });
11
+
12
+ test('Execute fetchFFZEmotes without any parameters', async() => {
13
+ expect(await emoteFetcher.fetchFFZEmotes()).toBeInstanceOf(Collection);
14
+ });
15
+
16
+ test('Get emote (CatBag)', () => {
17
+ const emote = emoteFetcher.emotes.get('CatBag');
18
+ expect(emote.toLink(2)).toBe('https://cdn.frankerfacez.com/emote/25927/4');
19
+ });
20
+
21
+ test('Parse string with emote (CatBag)', () => {
22
+ const text = emoteParser.parse('This is a test string with :CatBag: in it.');
23
+ expect(text).toBe('This is a test string with ![CatBag](https://cdn.frankerfacez.com/emote/25927/1 "CatBag") in it.');
24
+ });
25
+ });
26
+
27
+ describe('Test user emotes', () => {
28
+ const emoteFetcher = new EmoteFetcher();
29
+ const emoteParser = new EmoteParser(emoteFetcher, {
30
+ type: 'markdown',
31
+ match: /:(.+?):/g
32
+ });
33
+
34
+ test('Execute fetchFFZEmotes with user ID', async() => {
35
+ expect(await emoteFetcher.fetchFFZEmotes(44317909)).toBeInstanceOf(Collection);
36
+ });
37
+
38
+ test('Get emote (5Head)', () => {
39
+ const emote = emoteFetcher.emotes.get('5Head');
40
+ expect(emote.toLink(2)).toBe('https://cdn.frankerfacez.com/emote/239504/4');
41
+ });
42
+
43
+ test('Parse string with emote (5Head)', () => {
44
+ const text = emoteParser.parse('This is a test string with :5Head: in it.');
45
+ expect(text).toBe('This is a test string with ![5Head](https://cdn.frankerfacez.com/emote/239504/1 "5Head") in it.');
46
+ });
47
+ });
48
+
49
+ describe('Test animated and modifier emotes', () => {
50
+ const emoteFetcher = new EmoteFetcher();
51
+ const emoteParser = new EmoteParser(emoteFetcher, {
52
+ type: 'markdown',
53
+ match: /:(.+?):/g
54
+ });
55
+
56
+ test('Execute fetchFFZEmotes with user ID', async() => {
57
+ expect(await emoteFetcher.fetchFFZEmotes(44317909)).toBeInstanceOf(Collection);
58
+ });
59
+
60
+ test('Get animated emote (MikuSway)', () => {
61
+ const emote = emoteFetcher.emotes.get('MikuSway');
62
+ expect(emote.toLink(2)).toBe('https://cdn.frankerfacez.com/emote/723102/animated/4.webp');
63
+ });
64
+
65
+ test('Parse string with emote (monkaEyes) and modifier (ffzHyper)', () => {
66
+ const text = emoteParser.parse('This is a test string with :monkaEyes: :ffzHyper: in it.');
67
+ // Note the double space: ffzHyper is removed but not the space before
68
+ expect(text).toBe('This is a test string with ![monkaEyes](https://cdn.frankerfacez.com/emote/268204/1 "monkaEyes") in it.');
69
+ });
70
+ });
71
+ });
@@ -0,0 +1,70 @@
1
+ const { describe, expect, test } = require('@jest/globals');
2
+ const { EmoteFetcher, EmoteParser, Collection } = require('../src/index.js');
3
+
4
+ describe('Test 7TV emotes', () => {
5
+ describe('Test global emotes (WEBP)', () => {
6
+ const emoteFetcher = new EmoteFetcher();
7
+ const emoteParser = new EmoteParser(emoteFetcher, {
8
+ type: 'markdown',
9
+ match: /:(.+?):/g
10
+ });
11
+
12
+ test('Execute fetchSevenTVEmotes with the WEBP format', async() => {
13
+ expect(await emoteFetcher.fetchSevenTVEmotes(null, 'webp')).toBeInstanceOf(Collection);
14
+ });
15
+
16
+ test('Get emote (EZ)', () => {
17
+ const emote = emoteFetcher.emotes.get('EZ');
18
+ expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/61525bba20eaf897465aab47/3x.webp');
19
+ });
20
+
21
+ test('Parse string with emote (EZ)', () => {
22
+ const text = emoteParser.parse('This is a test string with :EZ: in it.');
23
+ expect(text).toBe('This is a test string with ![EZ](https://cdn.7tv.app/emote/61525bba20eaf897465aab47/1x.webp "EZ") in it.');
24
+ });
25
+ });
26
+
27
+ describe('Test global emotes (AVIF)', () => {
28
+ const emoteFetcher = new EmoteFetcher();
29
+ const emoteParser = new EmoteParser(emoteFetcher, {
30
+ type: 'markdown',
31
+ match: /:(.+?):/g
32
+ });
33
+
34
+ test('Execute fetchSevenTVEmotes with the AVIF format', async() => {
35
+ expect(await emoteFetcher.fetchSevenTVEmotes(null, 'avif')).toBeInstanceOf(Collection);
36
+ });
37
+
38
+ test('Get emote (Clap)', () => {
39
+ const emote = emoteFetcher.emotes.get('Clap');
40
+ expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/634885e1e417daf82c4d7247/3x.avif');
41
+ });
42
+
43
+ test('Parse string with emote (Clap)', () => {
44
+ const text = emoteParser.parse('This is a test string with :Clap: in it.');
45
+ expect(text).toBe('This is a test string with ![Clap](https://cdn.7tv.app/emote/634885e1e417daf82c4d7247/1x.avif "Clap") in it.');
46
+ });
47
+ });
48
+
49
+ describe('Test user emotes', () => {
50
+ const emoteFetcher = new EmoteFetcher();
51
+ const emoteParser = new EmoteParser(emoteFetcher, {
52
+ type: 'markdown',
53
+ match: /:(.+?):/g
54
+ });
55
+
56
+ test('Execute fetchSevenTVEmotes with user ID', async() => {
57
+ expect(await emoteFetcher.fetchSevenTVEmotes(44317909)).toBeInstanceOf(Collection);
58
+ });
59
+
60
+ test('Get emote (modCheck)', () => {
61
+ const emote = emoteFetcher.emotes.get('modCheck');
62
+ expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/60abf171870d317bef23d399/3x.webp');
63
+ });
64
+
65
+ test('Parse string with emote (modCheck)', () => {
66
+ const text = emoteParser.parse('This is a test string with :modCheck: in it.');
67
+ expect(text).toBe('This is a test string with ![modCheck](https://cdn.7tv.app/emote/60abf171870d317bef23d399/1x.webp "modCheck") in it.');
68
+ });
69
+ });
70
+ });