Top "Chai" questions

Chai is a BDD/TDD assertion library for Node.

Chai: expecting an error or not depending on a parameter

I've been trying to do a text of a function that handles errors in a way that, if it is …

javascript mocha chai
Are Cucumber and Gherkin alternatives to Mocha and Chai? Can Mocha and Chai be used with Java code?

If someone can point out any other source on StackOverflow etc. where more info about this exists, even that will …

cucumber mocha.js bdd chai gherkin
Sinon to unit test 'catch' statement

I've got a simple function such as; module.exports = { fetchUser:function(myUserId) { return new Promise((resolve, reject) => { this.getUser(…

node.js unit-testing sinon chai
How to test if something is a function with Chai.should

I want to check if something is a function with Chai.should. So I did typeof(barfoo).should.equals('function') …

javascript unit-testing chai
How can I test floating-point equality using chai?

We're using Chai's BDD API to write unit tests. How can we assert floating point equality? For example, if I …

javascript floating-point precision chai
Chai assertion testing whether object structure contains at least other object structure

I'm using Mocha for unit testing and Chai for assertions. I'd like to find an easy to use solution to …

javascript tdd bdd chai assertion