<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>MiyuTsukagoshi</author_name>
  <author_url>https://blog.hatena.ne.jp/MiyuTsukagoshi/</author_url>
  <blog_title>iimon TECH BLOG</blog_title>
  <blog_url>https://tech.iimon.co.jp/</blog_url>
  <categories>
  </categories>
  <description>こんにちは！Jest を勉強中の新卒エンジニアの”つかちゃん”と申します！ ✨ 今回は、Jestでよく使われるモック関連の関数 clearAllMocks() と resetAllMocks() の違いについて、「どっちがどっちだっけ？」とテストを書いていてふと思ったので初心者の自分なりに調べたことをまとめてみました。同じようにモックの使い方で悩んでいる方の参考になれば嬉しいです！ この記事では： モックってなに？ clearAllMocks()とは？ resetAllMocks()とは？ どっちを使えばいいの？ という順番で、わかりやすく解説していきます！ 🧪 まず初めに「モック」ってなに？…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.iimon.co.jp%2Fentry%2F2025%2F07%2F15%2F153331&quot; title=&quot;clearAllMocks() vs resetAllMocks()　　　　違いと使い分けを完全解説 - iimon TECH BLOG&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/M/MiyuTsukagoshi/20250711/20250711132118.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-07-15 15:33:31</published>
  <title>clearAllMocks() vs resetAllMocks()　　　　違いと使い分けを完全解説</title>
  <type>rich</type>
  <url>https://tech.iimon.co.jp/entry/2025/07/15/153331</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
