海外TECH |
MakeUseOf |
What Is SIM Card Swapping? 5 Tips to Protect Yourself From This Scam |
https://www.makeuseof.com/tag/sim-card-swapping/
|
What Is SIM Card Swapping Tips to Protect Yourself From This ScamWith the rise in mobile account access and FA for security SIM card swapping is a growing security risk Here s how to stop it |
2022-06-05 20:45:13 |
海外TECH |
MakeUseOf |
How to Use the CONCATENATE Function in Google Sheets |
https://www.makeuseof.com/use-concatenate-function-google-sheets/
|
sheets |
2022-06-05 20:30:14 |
海外TECH |
DEV Community |
What are you testing? |
https://dev.to/noriller/what-are-you-testing-35jd
|
What are you testing I m having the privilege of working with people who will be doing testing for the first time Meaning…this is an opportunity to observe people who are programming for years and yet had never tested be it for “lack of time or for not thinking it is important Be it as it may…I ll keep you posted What are you testing This is probably the first thing I ve noticed while reviewing the first tests on something that was “already working Code is the law If you re testing something that is “already working then that code is the law And you should be testing what it is saying it does and not what you think or what you want it to do This might seem contradictory but if you want your code to do something then you have to actually have lines of coding that enforce what you want or else you ll end up with something that might just work because of luck ExampleWe started testing an “UserCase which is the middle man between the “Controller and the Repository Database class RepositoryExample async getAll someFilter class UserCaseExample constructor repository this repository repository validate someData async run someData if validate someData just an example don t throw plain objects around throw message code return this repository getAll someData class ControllerExample async getArrayOfSomething someData const repository new RepositoryExample const userCase new UserCaseExample repository try return userCase run someData catch message code HTMLException message code I ve tried to keep it as simple as possible but what would you test in the UserCaseExample The first try UserCaseExample test jsclass MockingRepository constructor this database async getAll someFilter return this database filter describe Testing UserCaseExample gt it Valid return of repository data gt const uc new UserCaseExample new MockingRepository const resultArr uc run test expect resultArr length gt amp amp Array isArray resultArr toBe true for result of resultArr expect result toBe expect objectContaining key expect stringContaining test key expect any Number key expect any String While not the scope of this post there are some wordings that at least I find…strange to say the least This will come later but feel free to discuss the naming of mock objects describe blocks and test names Another thing not in scope is the tool you re using We are using Jest and the lack of knowledge about mocks matchers and how to use Jest API was clear But knowing the tool is something you ll have to learn one way or another and each tool will differ Again feel free how would you refactor the test above if we ignore the main problem The main problemThe intent is clear They were expecting an array and the test is testing that they are getting the array But you see…the code is law and in no moment UserCaseExample mention an array As is it simply takes the result from the repository and passes it forward This means that the test should only test that whatever you pass in the repository is what you receive back which could be an array a null or a string for all it cares You can also test if the filter data is being passed and you can do it using proper mocks If it s important that you receive an array then the solution is also clear…change the code to reflect that you want to receive an array I m seeing that this will be the number one thing I ll keep having to remind people when testing “What are you testing And I ll keep saying that the code is law so have the code “tell you what you should be testing And if you re testing something that isn t in the code…then you should change the code first Cover Photo by Mufid Majnun on Unsplash |
2022-06-05 20:35:01 |
海外TECH |
Engadget |
'I Am Groot' heads to Disney+ on August 10th |
https://www.engadget.com/i-am-groot-august-10-release-date-201401124.html?src=rss
|
x I Am Groot x heads to Disney on August thMarvel s I Am Groot Disney nbsp animated series will arrive on August th Marvel Studios announced the release date on Sunday in a poster the company shared on Twitter The announcement means Marvel fans will have more than one series to watch this summer with She Hulk Attorney at Law nbsp premiering a week after I Am Groot I Am Groot Marvel Studios Original shorts coming August to DisneyPlus pic twitter com EODOFPLbtーMarvel Studios MarvelStudios June If it wasn t clear from the poster which features Baby Groot resting his cute head on the front of Star Lord s iconic Sony TPS L Walkman the series takes place after s Guardians of the Galaxy While Disney has yet to share many details on the series we do know that Vin Diesel will return to voice Groot in his latest misadventures With Sunday s announcement there s a good chance we could see Disney share the show s first trailer soon Groot will also appear in the upcoming Guardians of the Galaxy Holiday Special which is due later this year as well as Guardians of the Galaxy Vol next year |
2022-06-05 20:14:01 |
海外科学 |
NYT > Science |
Outcry Over High School Clinic Exposes Deep Divisions on Mental Health |
https://www.nytimes.com/2022/06/05/health/killingly-ct-mental-health-clinic-school.html
|
Outcry Over High School Clinic Exposes Deep Divisions on Mental HealthAmerican teenagers are reporting severe levels of anxiety and depression But when Connecticut moved to expand mental health services in schools it ran into fierce opposition in one town |
2022-06-05 20:19:26 |
ニュース |
BBC News - Home |
Diamond League: Great Britain's Jake Wightman wins 1500m in Rabat |
https://www.bbc.co.uk/sport/av/athletics/61700481?at_medium=RSS&at_campaign=KARANGA
|
rabat |
2022-06-05 20:24:12 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「ゴーンご指名」の社外取3人組が今も阻む日産の改革、自己保身とお手盛りガバナンスの実態 - 社外取「欺瞞のバブル」9400人の全序列 |
https://diamond.jp/articles/-/304200
|
「ゴーンご指名」の社外取人組が今も阻む日産の改革、自己保身とお手盛りガバナンスの実態社外取「欺瞞のバブル」人の全序列「ゴーン事件」から年。 |
2022-06-06 05:25:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「顧客思い」の保険会社ランキング2022!ベスト3位オリックス、1位は? - 保険商品ランキング2022 ベスト&ワースト |
https://diamond.jp/articles/-/304182
|
「顧客思い」の保険会社ランキングベスト位オリックス、位は保険商品ランキングベストワースト保険商品を通じて保険会社と接することの多い保険のプロたち。 |
2022-06-06 05:20:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
企業の「レジェンド農場」買い漁り加速!肥料・飼料高騰による赤字農家続出でM&A活況 - 儲かる農業 堕ちたJA |
https://diamond.jp/articles/-/303557
|
仕掛け人 |
2022-06-06 05:15:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
【スクープ】株主総会の“参謀役”アイ・アールジャパンに強制調査!「上場規程に抵触」の衝撃証拠を入手 - Diamond Premium News |
https://diamond.jp/articles/-/304350
|
【スクープ】株主総会の“参謀役アイ・アールジャパンに強制調査「上場規程に抵触」の衝撃証拠を入手DiamondPremiumNews上場企業の〝用心棒〟として株主対応などを手掛けるアイ・アールジャパン東証プライム上場が、上場規程に反して業績予想修正を適切に開示しなかった疑いが、ダイヤモンド編集部の取材で分かった。 |
2022-06-06 05:12:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
社外取締役・実名ランキング【上位4000人】報酬、兼務、業績で9400人の全序列を初試算 - 社外取「欺瞞のバブル」9400人の全序列 |
https://diamond.jp/articles/-/304199
|
上場企業 |
2022-06-06 05:05:00 |
ビジネス |
電通報 | 広告業界動向とマーケティングのコラム・ニュース |
―私とボス― アイデアでビジネスを動かす(前編) |
https://dentsu-ho.com/articles/8215
|
電通 |
2022-06-06 06:00:00 |
ビジネス |
電通報 | 広告業界動向とマーケティングのコラム・ニュース |
「AD MISSION(アドミッション)」と「推し活」が、マスメディア広告に新たな価値を生み出す |
https://dentsu-ho.com/articles/8212
|
mission |
2022-06-06 06:00:00 |
ビジネス |
電通報 | 広告業界動向とマーケティングのコラム・ニュース |
「キャラクター×テクノロジー」があらゆる顧客接点を改善する! |
https://dentsu-ho.com/articles/8193
|
顧客 |
2022-06-06 06:00:00 |
北海道 |
北海道新聞 |
ウクライナ、W杯出場逃す 欧州予選プレーオフ |
https://www.hokkaido-np.co.jp/article/689897/
|
欧州予選 |
2022-06-06 05:12:00 |
北海道 |
北海道新聞 |
<社説>拘禁刑創設 再犯防ぐ有効な制度に |
https://www.hokkaido-np.co.jp/article/689870/
|
禁錮 |
2022-06-06 05:01:00 |
コメント
コメントを投稿