Using babel-register with AVA and .babelrc's `"ignore": false`, but node_modules are not being transpiled
<p>I'm trying to have source files (and their dependencies in node_modules) be transpiled when running AVA tests. I've configured AVA to require <code>babel-register</code> and inherit my <code>.babelrc</code> file with the following in <code>package.json</code>:</p>

<pre><code>"ava": {
    "require": "babel-register",
    "babel": "inherit"
  }
</code></pre>

<p>and this in <code>.babelrc</code>:</p>

<pre><code>{
  "presets": [ "es2015" ],
  "ignore": false
}
</code></pre>

<p>I have <a href="https://github.com/tomwayson/esri-rollup-example/blob/b9aff3171db91cbe332ebdf0bc7183e793ff5609/test/unit/utilSpec.js#L2" rel="nofollow">a test spec that imports a source file</a> with and <a href="https://github.com/tomwayson/esri-rollup-example/blob/b9aff3171db91cbe332ebdf0bc7183e793ff5609/test/unit/utilSpec.js#L2" rel="nofollow">that source file imports an ES2015 dependency from node_modules</a>:</p>

<p>However, when running <code>ava</code> I see:</p>

<pre><code>/Users/me/code/esri-rollup-example/node_modules/capitalize-word/index.js:2
export default input =&gt; input.replace(regexp, match =&gt; match.charAt(0).toUpperCase() + match.substr(1));
^^^^^^

SyntaxError: Unexpected token export
</code></pre>

<p>Which tells me that the source file (<code>src/app/utils.js</code>) did transpile, but it's dependency in node_modules (<code>capitalize-string/index</code>) did not.</p>

<p>Both the source modules and dependencies transpile fine when I use babel CLI, so it really seems like the <code>.babelrc</code>'s <code>"ignore": false</code> setting is not getting passed to <code>babel-register</code>. I can see from the babel docs that you can <a href="https://babeljs.io/docs/usage/require/" rel="nofollow">explicitly pass an ignore option to <code>babel-register</code></a>, but I don't see how you can do that from the AVA config. I even tried adding the following to my test file before the line where it imports the source files, but I still see the same error:</p>

<pre><code>require("babel-register")({
  ignore: false
});
</code></pre>

<p>I suppose I could add a transpile step before testing, but I wanted to make sure that I wasn't just missing some AVA or babel configuration first.</p>