title: AVA unit tests fails passed Javascript test specs
body: <p>I am currently working with ES6 modules with <code>.mjs</code> extensions and creating test cases for some functions.</p>
  
  <p>I have chosen <code>AVA</code> due to its support of this extension type but the test executions are not running as expected.</p>
  
  <p><strong>I assume the script is not being transformed properly 
  or 
  I am missing a configuration in my <code>package.json</code></strong> </p>
  
  <p>I appreciate any help at all from anyone with experience with using AVA with <code>--experimental-modules</code> </p>
  
  <p>package.json</p>
  
  <pre><code>{
      "scripts": {
          "test": "ava --init"
      },
      "ava": {
          "require": [
        "esm"
      ],
          "babel": false,
          "extensions": [
        "mjs"
      ]
      }
  }
  </code></pre>
  
  <p>test.spec.mjs</p>
  
  <pre><code>import rotate from './index.mjs'
  import test from 'ava';
  
  test('rotate img', t =&gt; {
      var m = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
      rotate(m);
  
      t.is(m, [[7, 4, 1], [8, 5, 2], [9, 6, 3]]);
  });
  </code></pre>
  
  <p>index.js</p>
  
  <pre><code> var rotate =function(matrix) {
      let cols = 0,
       original = JSON.parse(JSON.stringify(matrix));
  
      for (let i=0; i &lt; matrix.length; i++){
          for (let j = matrix.length; j &gt; 0; j--){
              matrix[i][cols]=original[j-1][i]; 
  
              cols+=1;
              if(cols == matrix.length){
                  cols= 0;
              }
          }
      }
  }
  export default rotate;
  </code></pre>
  
  <p>On running <code>npm test</code> as defined in package script</p>
  
  <blockquote>
    <p>ERROR:</p>
  
  <pre><code> 1 test failed
  
    rotate
  
     12: rotate(m);
     13:     t.is(m, [[7,4,1],[8,5,2],[9,6,3]
     14: ]);
  
    Values are deeply equal to each other, but they are not the same:
  
    [[7,4,1,],[8,5,2,],[9,6,3,],] &lt;&lt;fails
  
  npm ERR! Test failed.  See above for more details.
  </code></pre>
  </blockquote>