How can I exclude files from Jest watch?
<p>I'm doing some slightly bizarre stuff using Jest for testing where I'm writing some stuff to disk. If I use the <code>watch</code> flag in Jest however then I'm finding (quite obviously) that each time I write something to disk the tests refire again.</p>
<p>I don't currently have any sort of configuration, and I've taken a look at <a href="https://facebook.github.io/jest/docs/configuration.html#content" rel="noreferrer">the documentation</a>, but it's really not clear to me which option I need to be using to suppress watching particular files. I believe I can see options to exclude code from code-coverage and test execution, but not the actual watcher.</p>
<p>In my case I've got a setup like this and I just want to suppress my results directory:</p>
<ul>
<li><code>__tests__</code></li>
<li><code>__snapshots__</code> (created by Jest)</li>
<li><code>results</code> (created by me and the directory to exclude)</li>
</ul>
<ul>
<li>testfile1.js</li>
</ul>
<p>How can I do this?</p>