title: Chai unittesting - expect(42).to.be.an('integer')
body: <p>According to <a href="http://chaijs.com/api/bdd/#a">http://chaijs.com/api/bdd/#a</a>, <code>a</code>/<code>an</code> can be used to check for the type of a variable.</p>
  
  <blockquote>
    <p>.a(type)</p>
    
    <p><code>@param{ String } type</code></p>
    
    <p><code>@param{ String } message _optional_</code></p>
    
    <p>The <code>a</code> and <code>an</code> assertions are aliases that can be used
    either as language chains or to assert a value's type.</p>
  </blockquote>
  
  <p>However, I'm not able to check for the variable beeing an integer. The given examples, e.g. <code>expect('1337').to.be.a('string');</code> work for me, but the following does not:</p>
  
  <pre><code>expect(42).to.be.an('integer');
  expect(42).to.be.an('Integer');
  expect(42).to.be.an('int');
  expect(42).to.be.an('Int');
  </code></pre>
  
  <p>All of them are giving me the following error when running mocha:</p>
  
  <pre><code>Uncaught AssertionError: expected 42 to be an integer
  </code></pre>
  
  <p>How do I test with chai for a variable beeing an integer?</p>