Repository: TheOdinProject/odin-bot-v2
Pull request #216 (2022-03-14 18:17:51)

PartyParrot command: Replace shark with new parrots
<!-- Thank you for taking the time to contribute to The Odin Project. In order to get a pull request (PR) closed in a reasonable amount of time, you must include a baseline of information about the changes you are proposing. Please read this template in its entirety before filling it out to ensure that it is filled out correctly. -->

Complete the following REQUIRED checkboxes:
<!-- While editing this template, replace the whitespace between the square brackets with an 'x', e.g. [x] -->
-   [X] I have thoroughly read and understand [The Odin Project Contributing Guide](https://github.com/TheOdinProject/theodinproject/blob/main/CONTRIBUTING.md)
-   [X] The title of this PR follows the `location of change: brief description of change` format, e.g. `Callbacks command: Update verbiage`

Complete the following checkboxes ONLY IF they are applicable to your PR. You can complete them later if they are not currently applicable:
-   [X] I have ensured all tests related to any command files included in this PR pass, and/or all snapshots are up to date

<hr>

**1. Because:** This command has a shark that isn't a parrot and could use more parrots
<!--
If this PR closes an open issue, replace the XXXXX below with the issue number, e.g. Closes #2013. Or if the issue is in another TOP repo replace the #XXXXX with the URL of the issue, e.g. Closes https://github.com/TheOdinProject/curriculum/issues/XXXXX

Otherwise, provide a clear and concise reason for your pull request, e.g. what problem it solves or what benefit it provides. If this PR is related to, but does not close, another issue or PR, you can also link it as above without the 'Closes' keyword, e.g. "Related to #2013".
 -->


**2. This PR:** adds more parrots and removes the shark
<!--
A bullet point list of one or more items outlining what was done in this PR to solve the problem(s) or implement the feature/enhancement.
 -->


**3. Additional Information:**
<!-- Any additional information about the PR, such as a link to a Discord discussion, etc. -->




Patch:
diff --git a/botCommands/partyParrot.js b/botCommands/partyParrot.js
index 7e74732..f78217f 100644
--- a/botCommands/partyParrot.js
+++ b/botCommands/partyParrot.js
@@ -12,7 +12,9 @@ const command = {
       'http://cultofthepartyparrot.com/parrots/slomoparrot.gif',
       'http://cultofthepartyparrot.com/parrots/hd/dealwithitparrot.gif',
       'http://cultofthepartyparrot.com/parrots/tripletsparrot.gif',
-      'http://emojis.slackmojis.com/emojis/images/1450738632/246/leftshark.png',
+      'https://i.imgur.com/Q1K4Wzx.gif', // Viking Parrot - Manon
+      'https://i.imgur.com/rcNgsYF.gif', // Stache Parrot - Manon
+      'https://i.imgur.com/RWZuxIa.gif', // Wine Parrot - Manon
     ];
 
     if (content.match('!')) {


Test patch:
diff --git a/botCommands/__snapshots__/partyParrot.test.js.snap b/botCommands/__snapshots__/partyParrot.test.js.snap
index 09d95f0..752ae72 100644
--- a/botCommands/__snapshots__/partyParrot.test.js.snap
+++ b/botCommands/__snapshots__/partyParrot.test.js.snap
@@ -24,4 +24,8 @@ exports[`partyparrot snapshot when randomInt is mocked, the output remains the s
 
 exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 7`] = `"http://cultofthepartyparrot.com/parrots/tripletsparrot.gif"`;
 
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 8`] = `"http://emojis.slackmojis.com/emojis/images/1450738632/246/leftshark.png"`;
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 8`] = `"https://i.imgur.com/Q1K4Wzx.gif"`;
+
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 9`] = `"https://i.imgur.com/rcNgsYF.gif"`;
+
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 10`] = `"https://i.imgur.com/RWZuxIa.gif"`;
diff --git a/botCommands/partyParrot.test.js b/botCommands/partyParrot.test.js
index df9ca11..6357050 100644
--- a/botCommands/partyParrot.test.js
+++ b/botCommands/partyParrot.test.js
@@ -70,7 +70,8 @@ describe('partyparrot snapshot', () => {
   it('when randomInt is mocked, the output remains the same', () => {
     // NOTE: if the length of the parrot array changes,
     // this for loop will need to be updated to reflect that change
-    for (let i = 0; i < 8; i += 1) {
+    // TODO: Automatically grab length of Parrots array
+    for (let i = 0; i < 10; i += 1) {
       randomInt.mockReturnValueOnce(i);
 
       expect(command.cb({ content: '' })).toMatchSnapshot();