<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>madogiwa0124</author_name>
  <author_url>https://blog.hatena.ne.jp/madogiwa0124/</author_url>
  <blog_title>Madogiwa Blog</blog_title>
  <blog_url>https://madogiwa0124.hatenablog.com/</blog_url>
  <categories>
    <anon>開発</anon>
    <anon>JavaScript</anon>
    <anon>フロントエンド</anon>
  </categories>
  <description>影響の大きいライブラリのアップデートを行う際にsnapshotを全てupdateする必要だがPRの差分は一旦小さくするために後でsnapshotテストの更新を行いたいケース等で一部のテストの実行有無を環境変数で切り替えたい時もままある気がするのでやり方をメモ📝 やり方は以下のような関数を用意して、 export const skippableIt = (name: string, test: () =&gt; void) =&gt; { const skip = process.env.SKIP_TEST === &quot;true&quot;; if (skip) { xit(name, test); } else { …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmadogiwa0124.hatenablog.com%2Fentry%2F2023%2F09%2F18%2F111344&quot; title=&quot;Jestで環境変数を使ってテストのSkipか実行かを切り替える方法MEMO - Madogiwa 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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-09-18 11:13:44</published>
  <title>Jestで環境変数を使ってテストのSkipか実行かを切り替える方法MEMO</title>
  <type>rich</type>
  <url>https://madogiwa0124.hatenablog.com/entry/2023/09/18/111344</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
