Should.js - Inconsistency in equals method should.equals
<p>I'm using the should.js framework (v8.2.x) to unit test and have been playing around with some very basic tests. However, I ran into this issue with the tests failing, which has stumped me.</p>

<p>I defined this dummy function to test, <code>add</code>:</p>

<pre><code>var add = function(a, b) {
  if (isNaN(a) || isNaN(b)) {
    throw new Error('One of the arguments is not a number');
  }
  return +a + +b
};
</code></pre>

<p>Now here're my dummy tests:</p>

<pre><code>should.equal(add('1', '1'), '2');   // passes
add('1', '1').should.equal('2')     // fails!
</code></pre>

<p>Now according to their <a href="https://github.com/shouldjs/should.js#shouldjs" rel="nofollow">github</a>, <code>should(something)</code> and <code>something.should</code> usually return the same thing, but there's no additional info on the differences.</p>

<p>According to their <a href="https://shouldjs.github.io/#should-equal" rel="nofollow">API documentation</a>, <code>should.equal</code> is the same as <code>assert.equal</code>. But this test passes for me:</p>

<pre><code>assert.equal(add('1','1'), '2'); // passes
</code></pre>

<p><strong>So I have three questions:</strong></p>

<ol>
<li>Why does <code>add('1', '1').should.equal('2')</code> not pass?</li>
<li>Why are the two usages of should yielding different results?</li>
<li>Why do the docs say <code>should.equals</code> is the same as <code>assert.equals</code> when they actually have different behavior?</li>
</ol>