chai - GradedJestRisk/js-training GitHub Wiki
List:
- API
- Cheatsheet
- fail a test
expect.fail('Make test fail')
- assert (node assertion API)
- BDD
- expect
- should
- expect is a function
- should is an object (should extends Object.prototype with a should() function )
const chai = require('chai'); // THIS const expect = chai.expect; const should = chai.should(); // OR THAT const should = require('chai').should(); const expect = require('chai').expect;
Curated list:
- things adds support for assertions on array elements
- exclude exclude properties in comparison
- as-promised asynchronous
- http
- sinon-chai extends assertion for sinon (test double)
- chai-fs to test filesystem
- chai-string to test string