Answer: What's the difference between assertion library, testing framework and testing environment in javascript?

rnagarajan96

Nagarajan R

Posted on September 15, 2020

Answer: What's the difference between assertion library, testing framework and testing environment in javascript?

Assertion libraries are tools to verify that things are correct.
This makes it a lot easier to test your code, so you don't have to do thousands of if statements.
Example (using should.js and Node.js assert module):

var output = mycode.doSomething();
output.should.equal('bacon'); //should.js
assert.eq(output, 'bacon'); //node.js assert

// The alternative
💖 💪 🙅 🚩
rnagarajan96
Nagarajan R

Posted on September 15, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related