<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>wheatandcat</author_name>
  <author_url>https://blog.hatena.ne.jp/wheatandcat/</author_url>
  <blog_title>wheatandcatの開発ブログ</blog_title>
  <blog_url>https://www.wheatandcat.me/</blog_url>
  <categories>
  </categories>
  <description>backend側のコードも増えてきたのでテストコードを追加しました。 backendのテストをする時はfirestoreに接続したくなかったので、回避するためにGoMockを使って実装してみました。 github.com GoMockはテスト用のモックを実装することで、テスト時に呼びたくない処理をモックで実装させることが可能になります。 やれることは、jest.mockに近いですがjsほどダイナミックな処理は書けないので色々と事前準備が必要なので、その書き方について紹介していきます。 jestjs.io まず、以下のコマンドを実行 $ go get github.com/golang/mock…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.wheatandcat.me%2Fentry%2F2020%2F01%2F05%2F094543&quot; title=&quot;GoMockを使ってHTTP Requestのテストを書いてみる - wheatandcatの開発ブログ&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-01-05 09:45:43</published>
  <title>GoMockを使ってHTTP Requestのテストを書いてみる</title>
  <type>rich</type>
  <url>https://www.wheatandcat.me/entry/2020/01/05/094543</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
