<p dir="auto">If an async op is not listed in the <code class="notranslate">OP_DETAILS</code> map in <code class="notranslate">40_testing.js</code>, you can get the following exception:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at asyncOpSanitizer (deno:runtime/js/40_testing.js:177:32)
    at async resourceSanitizer (deno:runtime/js/40_testing.js:369:7)
    at async Object.exitSanitizer [as fn] (deno:runtime/js/40_testing.js:426:9)
    at async runTest (deno:runtime/js/40_testing.js:786:7)
    at async Object.runTests (deno:runtime/js/40_testing.js:984:22)"><pre class="notranslate"><code class="notranslate">TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at asyncOpSanitizer (deno:runtime/js/40_testing.js:177:32)
    at async resourceSanitizer (deno:runtime/js/40_testing.js:369:7)
    at async Object.exitSanitizer [as fn] (deno:runtime/js/40_testing.js:426:9)
    at async runTest (deno:runtime/js/40_testing.js:786:7)
    at async Object.runTests (deno:runtime/js/40_testing.js:984:22)
</code></pre></div>
<p dir="auto">Presumably some fallback message should show up in these cases, in case a new op is mistakenly left out, and for ease of development.</p>
<p dir="auto">Additionally, some async ops related to resources (<code class="notranslate">op_read</code>, <code class="notranslate">op_write</code>, <code class="notranslate">op_shutdown</code>) and workers (<code class="notranslate">op_host_recv_ctrl</code>, <code class="notranslate">op_host_recv_message</code>) are currently missing.</p>
<p dir="auto">I don't have a clear reproduction path for this issue but I dug into the 40_testing.js code and I believe I found the cause of the issue. A user of my test_suite module opened <a href="https://github.com/udibo/test_suite/issues/16#issuecomment-1046193210" data-hovercard-type="issue" data-hovercard-url="/udibo/test_suite/issues/16/hovercard">an issue</a> saying they were getting an error when upgrading to the newest version that uses the test step API.  The user reported they are using Deno 1.19. Looking at the error message, it appeared to actually be an issue with Deno's test runner.</p>
<p dir="auto">The Deno.metrics().ops object has 281 keys. The OP_DETAILS object in <a href="https://github.com/denoland/deno/blob/v1.19.0/runtime/js/40_testing.js#L64">40_testing.js</a> only has 67 of those keys.</p>
<p dir="auto">In the asyncOpSanitizer, if there is a difference in ops dispatched and completed, it will try getting hint information from the OP_DETAILS <a href="https://github.com/denoland/deno/blob/v1.19.0/runtime/js/40_testing.js#L176">here</a> using destructuring assignment (shown below). If there isn't a hint in OP_DETAILS for the key, then the value returned from <code class="notranslate">OP_DETAILS[key]</code> is going to return undefined and you can't destructure undefined.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const [name, hint] = OP_DETAILS[key];"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">,</span> <span class="pl-s1">hint</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-c1">OP_DETAILS</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">If the key happens to be one that is undefined, this will throw the following error.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
        at asyncOpSanitizer (deno:runtime/js/40_testing.js:176:32)"><pre class="notranslate">TypeError: <span class="pl-c1">undefined</span> <span class="pl-s1">is</span> <span class="pl-s1">not</span> <span class="pl-s1">iterable</span> <span class="pl-kos">(</span><span class="pl-s1">cannot</span> <span class="pl-s1">read</span> <span class="pl-s1">property</span> <span class="pl-v">Symbol</span><span class="pl-kos">(</span><span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
        <span class="pl-s1">at</span><span class="pl-kos"></span> <span class="pl-en">asyncOpSanitizer</span> <span class="pl-kos">(</span><span class="pl-s1">deno</span>:<span class="pl-s1">runtime</span><span class="pl-c1">/</span><span class="pl-s1">js</span><span class="pl-c1">/</span><span class="pl-c1">40</span><span class="pl-s1">_testing</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">176</span>:<span class="pl-c1">32</span><span class="pl-kos">)</span></pre></div>