title: mocha/chai test Unexpected token =>
body: <p>I'm running a test, and I'm getting an unexpected error.</p>
  
  <p>I'm sorting the results:</p>
  
  <pre><code>        docs.sort((a, b) =&gt; m_ids.findIndex(id =&gt; a._id.equals(id)) - 
              m_ids.findIndex(id =&gt; b._id.equals(id)));
  </code></pre>
  
  <p>The error I'm getting is definitely related to that line</p>
  
  <pre><code>mbp:test testlab$ mocha .
  /Users/testlab/Documents/workspace/KBase/controller/KBase.js:112
                  docs.sort((a, b) =&gt; m_ids.findIndex(id =&gt; a._id.equals(id)) - 
                                   ^^
  SyntaxError: Unexpected token =&gt;
  </code></pre>
  
  <p>I was thinking about skipping the code by putting an if statement around it, but that doesn't seem to work either. </p>