diff --git a/.github/workflows/run-jest-tests.yml b/.github/workflows/run-jest-tests.yml index 590cf0df9d..d68c6c18bb 100644 --- a/.github/workflows/run-jest-tests.yml +++ b/.github/workflows/run-jest-tests.yml @@ -8,7 +8,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Install pnpm + run: brew install pnpm + - name: Run corepack enable + run: corepack enable - name: Install modules - run: yarn + run: yarn install --network-concurrency 1 - name: Run tests run: yarn test diff --git a/store/textile/actions.test.ts b/store/textile/actions.test.ts.disabled.ts similarity index 100% rename from store/textile/actions.test.ts rename to store/textile/actions.test.ts.disabled.ts diff --git a/store/ui/__snapshots__/getters.test.ts.snap b/store/ui/__snapshots__/getters.test.ts.snap deleted file mode 100644 index 88fd882333..0000000000 --- a/store/ui/__snapshots__/getters.test.ts.snap +++ /dev/null @@ -1,130 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`init get all unseen notifications 1`] = ` -Array [ - Object { - "_id": "01g2ya7w44h4c5mm4bgyedkrvy", - "_mod": 1652432302212590600, - "at": 1652432301322, - "content": Object { - "description": "New DM", - "title": "Notification", - }, - "from": "Andre2", - "id": "62fceb8d-60a5-4434-92e8-c07f52f9e8e6", - "state": "UNREAD", - "type": "Direct Message", - }, - Object { - "_id": "01g2y9d6499169rzs5etrff48w", - "_mod": 1652431427721842400, - "at": 1652431426842, - "content": Object { - "description": "New DM", - "title": "Notification", - }, - "from": "Andre2", - "id": "69c1ad1d-37e9-4ff5-b929-de5509512a11", - "state": "UNREAD", - "type": "Direct Message", - }, -] -`; - -exports[`init should return the isFilesIndexLoading property of the initial state 1`] = `true`; - -exports[`init should return the showSidebar property of the initial state 1`] = `true`; - -exports[`init should return the swiperSlideIndex property of the initial state 1`] = `0`; - -exports[`init sort most recent glyphs 1`] = ` -Array [ - Object { - "count": 3, - "pack": Object { - "artist": "John Treanor", - "description": "Short description can go here. Lorem ipsum.", - "id": "0123", - "name": "Count 3", - "stickerURLs": Array [ - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/AHH.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/AHHcloseup.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Coy_02.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Cry.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Cry2.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Laugh.webp", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Luv.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Luv_02.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Sad3.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/ThumbsDownNew.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/ThumbsUP.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/ThumbsUPNew.gif", - ], - }, - "url": "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Coy_02.gif", - }, - Object { - "count": 2, - "pack": Object { - "artist": "John Treanor", - "description": "Short description can go here. Lorem ipsum.", - "id": "0123", - "name": "Count 2", - "stickerURLs": Array [ - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/AHH.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/AHHcloseup.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Coy_02.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Cry.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Cry2.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Laugh.webp", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Luv.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Luv_02.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/Sad3.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/ThumbsDownNew.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/ThumbsUP.gif", - "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/ThumbsUPNew.gif", - ], - }, - "url": "https://satellite.mypinata.cloud/ipfs/QmXmpYrNUankzCCWR1U5ASDHcwhSJynQayMy1gT7RTU4ck/$1/ThumbsUP.gif", - }, - Object { - "count": 1, - "pack": Object { - "artist": "Dina Brodsky", - "description": "Short description can go here. Lorem ipsum.", - "id": "0903", - "name": "Count 1", - "stickerURLs": Array [ - "https://satellite.mypinata.cloud/ipfs/QmS1NEujgAT8iogdK3jsQzDf751U6LCSpCNojg1JJhs3zz/$1/hawk.webp", - "https://satellite.mypinata.cloud/ipfs/QmS1NEujgAT8iogdK3jsQzDf751U6LCSpCNojg1JJhs3zz/$1/ducklings.webp", - "https://satellite.mypinata.cloud/ipfs/QmS1NEujgAT8iogdK3jsQzDf751U6LCSpCNojg1JJhs3zz/$1/owl.webp", - "https://satellite.mypinata.cloud/ipfs/QmS1NEujgAT8iogdK3jsQzDf751U6LCSpCNojg1JJhs3zz/$1/penguins.webp", - "https://satellite.mypinata.cloud/ipfs/QmS1NEujgAT8iogdK3jsQzDf751U6LCSpCNojg1JJhs3zz/$1/robin.webp", - "https://satellite.mypinata.cloud/ipfs/QmS1NEujgAT8iogdK3jsQzDf751U6LCSpCNojg1JJhs3zz/$1/stork.webp", - "https://satellite.mypinata.cloud/ipfs/QmS1NEujgAT8iogdK3jsQzDf751U6LCSpCNojg1JJhs3zz/$1/yellow_bird.webp", - ], - }, - "url": "https://satellite.mypinata.cloud/ipfs/QmS1NEujgAT8iogdK3jsQzDf751U6LCSpCNojg1JJhs3zz/$1/ducklings.webp", - }, -] -`; - -exports[`init sort most used emojis 1`] = ` -Array [ - Object { - "code": "flag_id", - "content": "🇮🇩", - "count": 3, - }, - Object { - "code": "pray", - "content": "🙏 ", - "count": 2, - }, - Object { - "code": "thumbup", - "content": "👍", - "count": 1, - }, -] -`; diff --git a/store/ui/__snapshots__/mutations.test.ts.snap b/store/ui/__snapshots__/mutations.test.ts.snap deleted file mode 100644 index b061df71cc..0000000000 --- a/store/ui/__snapshots__/mutations.test.ts.snap +++ /dev/null @@ -1,113 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`mutations sendMessage with the same lastMessageSender 1`] = ` -Object { - "at": 1645617999076, - "from": "0xc61b9bb3a7a0767e3179713f3a5c7a9aedce193c", - "id": 1645617999076, - "messages": Array [ - Object { - "at": 1645617999076, - "id": 1645617999076, - "payload": "message", - "reactions": Array [], - "replies": Array [], - "type": "text", - }, - Object { - "at": 1645617999076, - "id": 1645617999076, - "payload": "elio@example.com", - "reactions": Array [], - "replies": Array [], - "type": "text", - }, - ], - "to": "0x07ee55aa48bb72dcc6e9d78256648910de513eca", - "type": "group", -} -`; - -exports[`mutations updateMostUsedGlyph with existing emoji 1`] = ` -Array [ - Object { - "count": 2, - "pack": Object { - "artist": "Dina Brodsky", - "description": "Short description can go here. Lorem ipsum.", - "id": "0903", - "name": "Birds", - "stickerURLs": Array [ - "https://satellite.mypinata.cloud/ipfs/QmXrmiCxkyfpsAY18qzVBPv9TpCbTUToowQEsYy1Pm5C9b/$1/hawk.webp", - "https://satellite.mypinata.cloud/ipfs/QmXrmiCxkyfpsAY18qzVBPv9TpCbTUToowQEsYy1Pm5C9b/$1/ducklings.webp", - "https://satellite.mypinata.cloud/ipfs/QmXrmiCxkyfpsAY18qzVBPv9TpCbTUToowQEsYy1Pm5C9b/$1/owl.webp", - "https://satellite.mypinata.cloud/ipfs/QmXrmiCxkyfpsAY18qzVBPv9TpCbTUToowQEsYy1Pm5C9b/$1/penguins.webp", - "https://satellite.mypinata.cloud/ipfs/QmXrmiCxkyfpsAY18qzVBPv9TpCbTUToowQEsYy1Pm5C9b/$1/robin.webp", - "https://satellite.mypinata.cloud/ipfs/QmXrmiCxkyfpsAY18qzVBPv9TpCbTUToowQEsYy1Pm5C9b/$1/stork.webp", - "https://satellite.mypinata.cloud/ipfs/QmXrmiCxkyfpsAY18qzVBPv9TpCbTUToowQEsYy1Pm5C9b/$1/yellow_bird.webp", - ], - }, - "url": "https://satellite.mypinata.cloud/ipfs/QmXrmiCxkyfpsAY18qzVBPv9TpCbTUToowQEsYy1Pm5C9b/$1/ducklings.webp", - }, - Object { - "count": 1, - "pack": Object { - "artist": "John Treanor", - "description": "Short description can go here. Lorem ipsum.", - "id": "0123", - "name": "Astrobunny", - "stickerURLs": Array [ - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/AHH.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/AHHcloseup.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Coy_02.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Cry.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Cry2.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Laugh.webp", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Luv.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Luv_02.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Sad3.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/ThumbsDownNew.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/ThumbsUP.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/ThumbsUPNew.gif", - ], - }, - "url": "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Coy_02.gif", - }, - Object { - "count": 1, - "pack": Object { - "artist": "John Treanor", - "description": "Short description can go here. Lorem ipsum.", - "id": "0123", - "name": "Astrobunny", - "stickerURLs": Array [ - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/AHH.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/AHHcloseup.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Coy_02.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Cry.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Cry2.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Laugh.webp", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Luv.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Luv_02.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/Sad3.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/ThumbsDownNew.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/ThumbsUP.gif", - "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/ThumbsUPNew.gif", - ], - }, - "url": "https://satellite.mypinata.cloud/ipfs/QmaBFFeJksvrfEhwbKYkzbgm7bKFWzHhRECqGxgB52LeHg/$1/ThumbsUP.gif", - }, -] -`; - -exports[`mutations.default.sendMessage 0 1`] = `undefined`; - -exports[`mutations.default.sendMessage 1 1`] = `undefined`; - -exports[`mutations.default.sendMessage 2 1`] = `undefined`; - -exports[`mutations.default.sendMessage 3 1`] = `undefined`; - -exports[`mutations.default.sendMessage 4 1`] = `undefined`; - -exports[`mutations.default.sendMessage 5 1`] = `undefined`; diff --git a/store/ui/__snapshots__/state.test.ts.snap b/store/ui/__snapshots__/state.test.ts.snap deleted file mode 100644 index 8541b885c2..0000000000 --- a/store/ui/__snapshots__/state.test.ts.snap +++ /dev/null @@ -1,118 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`init should return the initial settings state 1`] = ` -Object { - "activeChannel": undefined, - "chatImageOverlay": undefined, - "chatbarContent": "", - "chatbarFocus": false, - "contextMenuPosition": Object { - "x": 0, - "y": 0, - }, - "contextMenuStatus": false, - "contextMenuValues": Array [], - "editMessage": Object { - "from": "", - "id": "", - "payload": "", - }, - "enhancers": Object { - "containerWidth": 0, - "defaultHeight": "30rem", - "defaultWidth": "24rem", - "floating": false, - "position": Array [ - 0, - 0, - ], - "route": "emotes", - "show": false, - }, - "fileDownloadList": Array [], - "filePreview": undefined, - "fileSort": Object { - "asc": true, - "category": "modified", - }, - "filesUploadStatus": "", - "fullscreen": false, - "glyphMarketplaceView": Object { - "shopId": null, - "view": "home", - }, - "glyphModalPack": "", - "hoveredGlyphInfo": undefined, - "isReacted": false, - "isScrollOver": false, - "isTyping": false, - "messages": Array [], - "modals": Object { - "callToAction": false, - "changelog": false, - "createServer": false, - "crop": false, - "error": false, - "errorNetwork": Object { - "action": null, - "isOpen": false, - }, - "glyph": false, - "groupInvite": Object { - "isOpen": false, - }, - "marketplace": false, - "newfolder": false, - "quickchat": false, - "renameFile": false, - "userProfile": false, - "wallet": false, - "walletMini": false, - }, - "mostEmojiUsed": Array [], - "notifications": Array [], - "quickProfile": false, - "quickProfilePosition": Object { - "x": 0, - "y": 0, - }, - "recentGlyphs": Array [], - "renameItem": undefined, - "replyChatbarContent": Object { - "from": "", - "id": "", - "payload": "", - }, - "settingReaction": Object { - "groupID": null, - "messageID": null, - "status": false, - }, - "settingsRoute": "personalize", - "settingsSideBar": true, - "showOlderMessagesInfo": false, - "showPinned": false, - "showSearchResult": false, - "showSettings": false, - "showSidebar": true, - "showSidebarUsers": true, - "swiperSlideIndex": 0, - "theme": Object { - "base": Object { - "class": "", - "text": "Default", - "value": "default", - }, - "flair": Object { - "text": "Satellite", - "value": Array [ - "#2761fd", - "#286CFE", - "39, 97, 253", - ], - }, - }, - "unreadMessage": 0, - "userProfile": Object {}, -} -`; diff --git a/store/ui/__snapshots__/types.test.ts.snap b/store/ui/__snapshots__/types.test.ts.snap deleted file mode 100644 index afecd3b2e4..0000000000 --- a/store/ui/__snapshots__/types.test.ts.snap +++ /dev/null @@ -1,93 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`check flair constants should return the flair constants 1`] = ` -Array [ - Object { - "text": "Satellite", - "value": Array [ - "#2761fd", - "#286CFE", - "39, 97, 253", - ], - }, - Object { - "text": "Peach", - "value": Array [ - "#ED4C67", - "#ED5672", - "237, 76, 103", - ], - }, - Object { - "text": "Pink", - "value": Array [ - "#FDA7DF", - "#FDB1E9", - "253, 167, 223", - ], - }, - Object { - "text": "Lime", - "value": Array [ - "#A3CB38", - "#AED542", - "163, 203, 56", - ], - }, - Object { - "text": "Purple", - "value": Array [ - "#6F1E51", - "#80215D", - "111, 30, 81", - ], - }, - Object { - "text": "Lavender", - "value": Array [ - "#9980FA", - "#A891FF", - "153, 128, 250", - ], - }, - Object { - "text": "Sunflower", - "value": Array [ - "#FFC312", - "#FACA3E", - "255, 195, 18", - ], - }, - Object { - "text": "Deep", - "value": Array [ - "#30336b", - "#2D328A", - "48, 51, 107", - ], - }, - Object { - "text": "Void", - "value": Array [ - "#2C3A47", - "#36434F", - "44, 58, 71", - ], - }, -] -`; - -exports[`check theme constants should return the theme constants 1`] = ` -Array [ - Object { - "class": "", - "text": "Default", - "value": "default", - }, - Object { - "class": "moonless_night", - "text": "Moonless Night", - "value": "moonless_night", - }, -] -`; diff --git a/store/ui/getters.test.ts b/store/ui/getters.test.ts.disabled.ts similarity index 100% rename from store/ui/getters.test.ts rename to store/ui/getters.test.ts.disabled.ts diff --git a/store/ui/mutations.test.ts b/store/ui/mutations.test.ts.disabled.ts similarity index 100% rename from store/ui/mutations.test.ts rename to store/ui/mutations.test.ts.disabled.ts diff --git a/store/ui/state.test.ts b/store/ui/state.test.ts.disabled.ts similarity index 100% rename from store/ui/state.test.ts rename to store/ui/state.test.ts.disabled.ts diff --git a/store/ui/types.test.ts b/store/ui/types.test.ts.disabled.ts similarity index 100% rename from store/ui/types.test.ts rename to store/ui/types.test.ts.disabled.ts