From d07d9b5beddb801e4a062ea999855582ea96a0d0 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 16 Mar 2022 13:55:18 -0500 Subject: [PATCH] Mock API with MSW --- app/soapbox/__mocks__/api.js | Bin 585 -> 0 bytes app/soapbox/__tests__/api.js | Bin 0 -> 252 bytes app/soapbox/actions/__tests__/preload-test.js | Bin 1128 -> 1264 bytes .../actions/__tests__/statuses-test.js | Bin 915 -> 925 bytes app/soapbox/msw.js | Bin 0 -> 271 bytes app/soapbox/test_helpers.js | Bin 1198 -> 1271 bytes app/soapbox/test_setup.js | Bin 297 -> 366 bytes package.json | 1 + yarn.lock | 361 +++++++++++++++++- 9 files changed, 356 insertions(+), 6 deletions(-) delete mode 100644 app/soapbox/__mocks__/api.js create mode 100644 app/soapbox/__tests__/api.js create mode 100644 app/soapbox/msw.js diff --git a/app/soapbox/__mocks__/api.js b/app/soapbox/__mocks__/api.js deleted file mode 100644 index fcb3a3253e579869cb34179ee7b523bc5cb0c6c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 585 zcma)&O-=(b42Ab|3hySfXgEMsq>42sK&Wz4j|j|9NE}fKad(_#n5MI0Yk%+gJ=@XE zp5b{mAIA$iCJ()zM`-bC=dc@PzQeL;_f2EwDKMb3aDaCTtUY~3>*;7X;-FfsA7t5f z`(_}9qz*#9yo!{r`BHH>odUuGoLy`vp;F B!Vv%f diff --git a/app/soapbox/__tests__/api.js b/app/soapbox/__tests__/api.js new file mode 100644 index 0000000000000000000000000000000000000000..420a748284e558ab236543db3d7bf8d925955ca9 GIT binary patch literal 252 zcmZ8bI}XAy4BdN*w literal 0 HcmV?d00001 diff --git a/app/soapbox/actions/__tests__/preload-test.js b/app/soapbox/actions/__tests__/preload-test.js index 5290802d2665d800d74653997a78f00f4448d0bf..415b22da0c3b4cef27167a53205232788dd81e2b 100644 GIT binary patch delta 222 zcmaFC@qu%KwL)=fQCVt{jzUptafw2$LRwLNu7Y}TequpVeuaK+arws3K1KCLajntQGTw1dU1YYK~jE&equr9#^^pqd5E+|ZhmsMf~}oG wHJ1VyfcSd(dG3=LnKTqMp@IqudPS)PIh7hl1_n9`)wP<|V2Rqzmzd<30RHJ9=Kufz diff --git a/app/soapbox/actions/__tests__/statuses-test.js b/app/soapbox/actions/__tests__/statuses-test.js index 71a0596a4496278d9cf5f55db18222d768d730e8..7c9fba1b0279d59cf5ed64a41926078f8960856c 100644 GIT binary patch delta 236 zcmbQtK9_x>k*is8YEfBgk&Z%9YH^7|twLH+ey)OgaeiV!QhtSgZgIJ~HCJYCL4Hw* zLbXCsett=CNn%N=&cr#(B_KNWN{dr9xD>zuWQJb)=kva+*MX7~gV|5ggODZ%K zZ0!`Pq3RTXww06?<$)}P=>-`8RHs)AG{3Z1!^pruQwOdbB9&E~pQkZ7gwaR_NlMci Vs;U+$I9Y^AffMf1%}z{#i~uW+Lel^M delta 253 zcmbQsKAGJpGq)hWs6?S!!8fr$A+cD&GdH)iBrz!`6~wPqNGrBQ z3P1ocMI$#qIa|TjPN5nssGtDi>*eRUPqt!o3ekiLDk$g`r55B=Y8V+9=)eusv<6Gp g0%$ui^63%%tIRQWJdUKwIn~6&R||pT#>cfC% PomXN?g(SFpk{ltPy{bGhohvJ~xI_=c(Lh$Eu4&Dcm{yWn