<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/feed.rss.xml" type="text/xsl" media="screen"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Sho</title>
    <description></description>
    <link>https://speakerdeck.com/sho0226</link>
    <atom:link rel="self" type="application/rss+xml" href="https://speakerdeck.com/sho0226.rss"/>
    <lastBuildDate>2026-04-30 04:10:07 -0400</lastBuildDate>
    <item>
      <title>JSDOMの限界と実ブラウザテスト - Vitest Browser Mode実践</title>
      <description>Reactコンポーネントのテストで広く使われるJSDOMは、ブラウザ環境の代用品であり、レイアウト・イベント・非同期処理などで実ブラウザと差異があります。「テストは通るのに本番で動かない」問題が起こり得ます。
Vitest Browser Modeは実ブラウザ上でテストを実行するアプローチです。本トークでは、Testing Libraryからの移行を通じて見えた技術的な違いを深掘りします。

非同期アサーション: expect.element()とリトライ設計の関係
userEventのAPI設計: setup()が不要になった背景
イベント処理の違い: JSDOMで見逃される実ブラウザ特有の挙動
レンダリングと副作用: DOM APIやイベントループにより異なるuseEffectの振る舞い

JSDOMの限界、実ブラウザテストのトレードオフ、選択基準を実例とともにお話しします。</description>
      <media:content url="https://files.speakerdeck.com/presentations/6434b0a6beac46a2b6cefd4c500ab21a/preview_slide_0.jpg?39342956" type="image/jpeg" medium="image"/>
      <content:encoded>Reactコンポーネントのテストで広く使われるJSDOMは、ブラウザ環境の代用品であり、レイアウト・イベント・非同期処理などで実ブラウザと差異があります。「テストは通るのに本番で動かない」問題が起こり得ます。
Vitest Browser Modeは実ブラウザ上でテストを実行するアプローチです。本トークでは、Testing Libraryからの移行を通じて見えた技術的な違いを深掘りします。

非同期アサーション: expect.element()とリトライ設計の関係
userEventのAPI設計: setup()が不要になった背景
イベント処理の違い: JSDOMで見逃される実ブラウザ特有の挙動
レンダリングと副作用: DOM APIやイベントループにより異なるuseEffectの振る舞い

JSDOMの限界、実ブラウザテストのトレードオフ、選択基準を実例とともにお話しします。</content:encoded>
      <pubDate>Thu, 30 Apr 2026 00:00:00 -0400</pubDate>
      <link>https://speakerdeck.com/sho0226/jsdomnoxian-jie-toshi-burauzatesuto-vitest-browser-modeshi-jian</link>
      <guid>https://speakerdeck.com/sho0226/jsdomnoxian-jie-toshi-burauzatesuto-vitest-browser-modeshi-jian</guid>
    </item>
  </channel>
</rss>
