Top "Chai" questions

Chai is a BDD/TDD assertion library for Node.

How to make empty placeholder tests intentionally fail in Mocha?

I'm writing an API in NodeJS and testing using Mocha, Chai and SuperTest. I'm using a typical test-driven approach of …

node.js unit-testing mocha chai
simulate for onClick not working in enzyme

This is a cancel button <div className="cancelFileBtn" onClick={this.props.cancelFileSending}> I need to simulate its click,…

reactjs mocha chai enzyme
Check null value in Postman test cases .not.eql() or .not.equal() are not working

I'm working with a API project and using Postman for testing APIs. I wrote few test cases to check null …

postman chai postman-testcase
mocha not running all tests in test dir

This is my folder structure src/ a.js b.js test/ a.spec.js b.spec.js and I've tried …

node.js unit-testing testing mocha chai
Chai expect: an array to contain an object with at least these properties and values

I'm trying to validate that an array of objects like this: [ { a: 1, b: 2, c: 3 }, { a: 4, b: 5, c: 6 }, ... ] contains at least …

javascript mocha chai
Why is my mocha/chai Error throwing test failing?

I have a simple javascript package I'm trying to test. I want to check for an Error being thrown, but …

javascript mocha.js throw referenceerror chai
How to check whether the element exist using chai?

Using Chai, how can I see whether the element For example, a div with the class .avatar exist? I tried …

chai
chai.request is not a function while using request js for http service unit test

I have been using karma+requestjs + mocha + chai and sinon. i have been using chai-http module yet receives chai.request …

javascript mocha.js karma-runner chai requestjs
Stub moment.js constructor with Sinon

I am not able to stub the moment constructor when calling it with the format function to return a pre-defined …

mocha momentjs sinon chai
How can I check if checkbox is checked with Protractor, CucumberJS and Chai?

How can I check if checkbox is checked with Protractor, CucumberJS and Chai ? var el = 'myCheckbox'; this.expect(element(by.…

javascript protractor bdd chai cucumberjs