From 7b5114a1b844189f00708916f78d484b625e4210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 12 Jun 2022 20:29:28 +0200 Subject: [PATCH] prefer TypeScript for tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../{compose.test.js => compose.test.ts} | Bin ...oji.test.js => autosuggest_emoji.test.tsx} | Bin 931 -> 945 bytes .../{avatar.test.js => avatar.test.tsx} | Bin ...verlay.test.js => avatar_overlay.test.tsx} | Bin .../{badge.test.js => badge.test.tsx} | Bin ...lay_name.test.js => display_name.test.tsx} | Bin ...lector.test.js => emoji_selector.test.tsx} | Bin ...ton.test.js => scroll-top-button.test.tsx} | Bin .../{captcha.test.js => captcha.test.tsx} | Bin ...login_form.test.js => login_form.test.tsx} | Bin ...login_page.test.js => login_page.test.tsx} | Bin .../{emoji_picker.ts => emoji_picker.js} | Bin ...button.test.js => compose-button.test.tsx} | Bin .../features/ui/components/list_panel.tsx | 2 +- ...tion.test.js => age-verification.test.tsx} | Bin ...on.test.js => email-verification.test.tsx} | Bin ...tion.test.js => sms-verification.test.tsx} | Bin .../{compose-test.js => compose.test.ts} | Bin 15219 -> 15183 bytes .../{contexts-test.js => contexts.test.ts} | Bin 3372 -> 3549 bytes ...{list_adder-test.js => list_adder.test.ts} | Bin 2621 -> 2652 bytes .../{modals-test.js => modals.test.ts} | Bin 1338 -> 1573 bytes app/soapbox/reducers/__tests__/mutes.test.ts | 4 ++++ .../{config_db-test.js => config_db.test.ts} | Bin 373 -> 418 bytes .../{numbers-test.tsx => numbers.test.tsx} | 0 24 files changed, 5 insertions(+), 1 deletion(-) rename app/soapbox/actions/__tests__/{compose.test.js => compose.test.ts} (100%) rename app/soapbox/components/__tests__/{autosuggest_emoji.test.js => autosuggest_emoji.test.tsx} (88%) rename app/soapbox/components/__tests__/{avatar.test.js => avatar.test.tsx} (100%) rename app/soapbox/components/__tests__/{avatar_overlay.test.js => avatar_overlay.test.tsx} (100%) rename app/soapbox/components/__tests__/{badge.test.js => badge.test.tsx} (100%) rename app/soapbox/components/__tests__/{display_name.test.js => display_name.test.tsx} (100%) rename app/soapbox/components/__tests__/{emoji_selector.test.js => emoji_selector.test.tsx} (100%) rename app/soapbox/components/__tests__/{scroll-top-button.test.js => scroll-top-button.test.tsx} (100%) rename app/soapbox/features/auth_login/components/__tests__/{captcha.test.js => captcha.test.tsx} (100%) rename app/soapbox/features/auth_login/components/__tests__/{login_form.test.js => login_form.test.tsx} (100%) rename app/soapbox/features/auth_login/components/__tests__/{login_page.test.js => login_page.test.tsx} (100%) rename app/soapbox/features/emoji/{emoji_picker.ts => emoji_picker.js} (100%) rename app/soapbox/features/ui/components/__tests__/{compose-button.test.js => compose-button.test.tsx} (100%) rename app/soapbox/features/verification/steps/__tests__/{age-verification.test.js => age-verification.test.tsx} (100%) rename app/soapbox/features/verification/steps/__tests__/{email-verification.test.js => email-verification.test.tsx} (100%) rename app/soapbox/features/verification/steps/__tests__/{sms-verification.test.js => sms-verification.test.tsx} (100%) rename app/soapbox/reducers/__tests__/{compose-test.js => compose.test.ts} (96%) rename app/soapbox/reducers/__tests__/{contexts-test.js => contexts.test.ts} (91%) rename app/soapbox/reducers/__tests__/{list_adder-test.js => list_adder.test.ts} (93%) rename app/soapbox/reducers/__tests__/{modals-test.js => modals.test.ts} (56%) rename app/soapbox/utils/__tests__/{config_db-test.js => config_db.test.ts} (61%) rename app/soapbox/utils/__tests__/{numbers-test.tsx => numbers.test.tsx} (100%) diff --git a/app/soapbox/actions/__tests__/compose.test.js b/app/soapbox/actions/__tests__/compose.test.ts similarity index 100% rename from app/soapbox/actions/__tests__/compose.test.js rename to app/soapbox/actions/__tests__/compose.test.ts diff --git a/app/soapbox/components/__tests__/autosuggest_emoji.test.js b/app/soapbox/components/__tests__/autosuggest_emoji.test.tsx similarity index 88% rename from app/soapbox/components/__tests__/autosuggest_emoji.test.js rename to app/soapbox/components/__tests__/autosuggest_emoji.test.tsx index 938ca737b2d6ce1beca00585202561a1dd00a045..8fab0ef8b0930f8db8847ee4869bf061f14e8ccb 100644 GIT binary patch delta 36 kcmZ3?zL9-{KO?(BVzEMEUgc(g#`$p0WPiri$;HeD0Mq6RZ2$lO delta 20 ZcmdnUzL state.lists], list return lists; } - return lists.toList().filter(item => !!item).sort((a, b) => (a as ListEntity).title.localeCompare((b as ListEntity).title)).take(4) as ImmutableList;; + return lists.toList().filter(item => !!item).sort((a, b) => (a as ListEntity).title.localeCompare((b as ListEntity).title)).take(4) as ImmutableList; }); const ListPanel = () => { diff --git a/app/soapbox/features/verification/steps/__tests__/age-verification.test.js b/app/soapbox/features/verification/steps/__tests__/age-verification.test.tsx similarity index 100% rename from app/soapbox/features/verification/steps/__tests__/age-verification.test.js rename to app/soapbox/features/verification/steps/__tests__/age-verification.test.tsx diff --git a/app/soapbox/features/verification/steps/__tests__/email-verification.test.js b/app/soapbox/features/verification/steps/__tests__/email-verification.test.tsx similarity index 100% rename from app/soapbox/features/verification/steps/__tests__/email-verification.test.js rename to app/soapbox/features/verification/steps/__tests__/email-verification.test.tsx diff --git a/app/soapbox/features/verification/steps/__tests__/sms-verification.test.js b/app/soapbox/features/verification/steps/__tests__/sms-verification.test.tsx similarity index 100% rename from app/soapbox/features/verification/steps/__tests__/sms-verification.test.js rename to app/soapbox/features/verification/steps/__tests__/sms-verification.test.tsx diff --git a/app/soapbox/reducers/__tests__/compose-test.js b/app/soapbox/reducers/__tests__/compose.test.ts similarity index 96% rename from app/soapbox/reducers/__tests__/compose-test.js rename to app/soapbox/reducers/__tests__/compose.test.ts index 1c4e709483e48752dc3121a35f63dddcb00dd9be..42c276cf6133925e5a9f910857a923e02a230160 100644 GIT binary patch delta 206 zcmexdcD_tLGq)hWs6?S!!6&o0L?N+Q!813vv?MVpClw^1vymfKmLEk(LvykrzuD$_ zvio_^B{s)vePEqjqoh80wn4^Zd26l76J$6h*BS{K|Ld}IHM#nU0op- zY$Q+<*JeH=F-EWn1;!yz6WAwjHxi#b+n8swh>12cSaO0H>*NXMN?-*I3LKjsm``Q~ E05Fh91ONa4 delta 124 zcmX?K_PLBBGq)hWs6?T9qkOC^bG1V4tuEjFtd$uWY}CGnU}&NL1IsoDI_*pC@5m~5^N O)_Bj1ZSz6%K4t)U2Q6O! diff --git a/app/soapbox/reducers/__tests__/contexts-test.js b/app/soapbox/reducers/__tests__/contexts.test.ts similarity index 91% rename from app/soapbox/reducers/__tests__/contexts-test.js rename to app/soapbox/reducers/__tests__/contexts.test.ts index d5270f0d8e5cd04d383d5fb877d5e7e6ed80b35b..90176309166c1003ec4e6e2e07359d89fe091e17 100644 GIT binary patch delta 214 zcmZ1@bys==3lqCSVzEMEUgc&MroEgBAdY8lZfQwkQckLGVu4L@Nl|8Ax{d;bwwrvA ryTTNwBDhZfqLkF4)Rf@V5~u-oc9Si6f`~ERcJc`xUNWt?$`cL%9wSZ* delta 42 rcmcaBy+&#S3)5z9roEh#UvO7Up2`yhq-}XMb+{CupjLBo8*exOGj9yh diff --git a/app/soapbox/reducers/__tests__/list_adder-test.js b/app/soapbox/reducers/__tests__/list_adder.test.ts similarity index 93% rename from app/soapbox/reducers/__tests__/list_adder-test.js rename to app/soapbox/reducers/__tests__/list_adder.test.ts index 4806d3d13908fb9e199293448246e3f180455b87..3989cf5e7027f0553f21f0b18c1d9eca0ac7f71a 100644 GIT binary patch delta 98 zcmdlhaz|u?JR`e8VzEMEUgc(aMo&f#o8pq9%)E5F$+fI{lli$gH_vA}izzyJK9k4h T*DU?mWhTF7;n~c}Zov!y8NVMH delta 50 zcmca3vR7n-Jmcg*_N9|gGcK82!)P;kKa2C`Z%nO>AkOCfESJCxps4?56?O||0RLVR A+5i9m diff --git a/app/soapbox/reducers/__tests__/modals-test.js b/app/soapbox/reducers/__tests__/modals.test.ts similarity index 56% rename from app/soapbox/reducers/__tests__/modals-test.js rename to app/soapbox/reducers/__tests__/modals.test.ts index 36f4fba64046e385b81013e87576360cae8978a1..bbb5c4552892a12e23f10190287f26b74b9efba1 100644 GIT binary patch delta 360 zcmdnRwUlRqoV1QYP-=31QHnxhv4UrAZfQwkQcfyFXrkO(c93vlUgczN#vE1~Aj58R zIim-oIF|w#plQ&U{E=B@vMZA^n}R~EriSL^0v4OemOvq1CJDya$u-QS0@!qzDJbOT zrzGYC6y+BbTPfs~=H%!=EdZGUV`I@OHF+NkhXu$fWE!9%hhHnu2US4VbF;b@mL}#* Ye!;A3fJXzwrLmgUK-bp-NiGlp05$AtP5=M^ delta 151 zcmZ3=vx{qj+(gT_lXV$$7&RsbGHY!<$tcUnRLwP+ky&B#dq$^{l&847F3naNf1ORz#F9iSq diff --git a/app/soapbox/reducers/__tests__/mutes.test.ts b/app/soapbox/reducers/__tests__/mutes.test.ts index 512a5260ff..411db10c68 100644 --- a/app/soapbox/reducers/__tests__/mutes.test.ts +++ b/app/soapbox/reducers/__tests__/mutes.test.ts @@ -42,6 +42,8 @@ describe('mutes reducer', () => { it('should handle MUTES_TOGGLE_HIDE_NOTIFICATIONS', () => { const state = ImmutableRecord({ new: ImmutableRecord({ + isSubmitting: false, + accountId: null, notifications: true, })(), })(); @@ -50,6 +52,8 @@ describe('mutes reducer', () => { }; expect(reducer(state, action).toJS()).toEqual({ new: { + isSubmitting: false, + accountId: null, notifications: false, }, }); diff --git a/app/soapbox/utils/__tests__/config_db-test.js b/app/soapbox/utils/__tests__/config_db.test.ts similarity index 61% rename from app/soapbox/utils/__tests__/config_db-test.js rename to app/soapbox/utils/__tests__/config_db.test.ts index b8ad15e0f5e45791760472345609463e20b6d16c..a83757eb35d4e222740418fd3b67e985df127957 100644 GIT binary patch delta 65 zcmey$w1`1}#VqT@)#4n8i D6pI+$ delta 20 bcmZ3){FR9#Gq)hWs6?T9qWqi5ij0i_P`3xI diff --git a/app/soapbox/utils/__tests__/numbers-test.tsx b/app/soapbox/utils/__tests__/numbers.test.tsx similarity index 100% rename from app/soapbox/utils/__tests__/numbers-test.tsx rename to app/soapbox/utils/__tests__/numbers.test.tsx