<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ema_hiro</author_name>
  <author_url>https://blog.hatena.ne.jp/ema_hiro/</author_url>
  <blog_title>emahiro/b.log</blog_title>
  <blog_url>https://ema-hiro.hatenablog.com/</blog_url>
  <categories>
    <anon>firebase</anon>
    <anon>GCP</anon>
  </categories>
  <description>Overview テストを書くときにテストの実行前にデータを作成し、終わったら削除したくなる時がありますね？僕はあります。 Firestore が絡んだテストを書くときに Firestore Emulator を起動した状態で実際にデータを作成して、終わったら削除する場合の実装方法について記載します。 Sample 事前に Firestore Emulator を起動した状態で、愚直に Add してテストが完了したら defer で Truncatate します。 $gcloud beta emulators firestore start --host-port=localhost:$POR…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fema-hiro.hatenablog.com%2Fentry%2F2020%2F12%2F22%2F014128&quot; title=&quot;Firestore が絡んだテストで事前にデータを生成し終わったら削除する - emahiro/b.log&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-12-22 01:41:28</published>
  <title>Firestore が絡んだテストで事前にデータを生成し終わったら削除する</title>
  <type>rich</type>
  <url>https://ema-hiro.hatenablog.com/entry/2020/12/22/014128</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
