<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>n_so5</author_name>
  <author_url>https://blog.hatena.ne.jp/n_so5/</author_url>
  <blog_title>HPCメモ</blog_title>
  <blog_url>https://hpcmemo.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>テスト対象の関数がイベントベースの非同期関数で、あるイベント(ここでは&quot;close&quot;とします)が終わった後で何か値の検証をしたいって時に、今まで次のようなコードを書いていました。 it(&quot;should fire close&quot;, (done)=&gt; hoge.on(&quot;close&quot;, ()=&gt;{ expect(huga).to.equal(&quot;piyo&quot;); }); }); これでも正常動作しているとテスト自体は問題無いんですが、expectでチェックしている項目がfailした時に、タイムアウトまで待たされる上に 落ちた場所も分かりません。 で、今まではテストにfailしたら、expectの前後にDE…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhpcmemo.hatenablog.com%2Fentry%2F2024%2F02%2F11%2F142107&quot; title=&quot;mocha であるイベントが発火した後に色々テストしたい時 - HPCメモ&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>2024-02-11 14:21:07</published>
  <title>mocha であるイベントが発火した後に色々テストしたい時</title>
  <type>rich</type>
  <url>https://hpcmemo.hatenablog.com/entry/2024/02/11/142107</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
