Top "Chai" questions

Chai is a BDD/TDD assertion library for Node.

Getting a UnhandledPromiseRejectionWarning when testing using mocha/chai

So, I'm testing a component that relies on an event-emitter. To do so I came up with a solution using …

javascript node.js promise mocha chai
Mocha / Chai expect.to.throw not catching thrown errors

I'm having issues getting Chai's expect.to.throw to work in a test for my node.js app. The test …

javascript node.js mocha chai
In mocha testing while calling asynchronous function how to avoid the timeout Error: timeout of 2000ms exceeded

In my node application I'm using mocha to test my code. While calling many asynchronous functions using mocha, I'm getting …

node.js mocha chai
chai test array equality doesn't work as expected

Why does the following fail? expect([0,0]).to.equal([0,0]); and what is the right way to test that?

node.js mocha chai
How can I check that two objects have the same set of property names?

I am using node, mocha, and chai for my application. I want to test that my returned results data property …

javascript node.js mocha chai
How do I properly test promises with mocha and chai?

The following test is behaving oddly: it('Should return the exchange rates for btc_ltc', function(done) { var pair = 'btc_…

node.js promise mocha chai
Testing for errors thrown in Mocha

I'm hoping to find some help with this problem. I'm trying to write tests for an application I am writing. …

javascript testing mocha chai
Mocha API Testing: getting 'TypeError: app.address is not a function'

My Issue I've coded a very simple CRUD API and I've started recently coding also some tests using chai and …

javascript node.js express mocha chai
What is the difference between “assert”, “expect”, and “should” in Chai?

What is the difference between assert, expect, and should? When to use what? assert.equal(3, '3', '== coerces values …

javascript mocha chai
When should you use render and shallow in Enzyme / React tests?

prior to posting this question, I tried to search in sqa stackexchange but I found no post about shallow and …

testing meteor reactjs chai enzyme