原创 前端UI自動化測試(TypeScript+Jest+Puppeteer)

最近幾個月來,筆者一直在探索前端UI自動化測試的場景和方案。最初的時候,面對衆多的技術選型,顯得有些茫然,而團隊此前也沒有太多關於這方面的經驗,只能一步一步摸索總結,當然期間也踩過不少坑,最終形成了一套相對穩定的測試方案,未來還將繼續擴展和

原创 The impacts of using index as key in React

Let's say there's a list that you want to show in React, and some developers may use index as key to avoid the warning o

原创 React's setState is not asynchronous!

We always hear that React's setState is asynchronous, and I've been convinced of this until I read the source code of Re

原创 電影《動物世界》對戰系統(Javascript)

最近刷了一部電影《動物世界》,感概原來簡單的“剪刀石頭布”遊戲還可以這麼燒腦,強大的數據分析能力、對人性心理的靈敏嗅覺等。看完之後饒有興致,於是便利用socket技術,實現了一個“動物世界”多人對戰系統。 遊戲背景 故事講述的是男主被髮小