chai - GradedJestRisk/js-training GitHub Wiki

General

List:

3 assertion styles:
  • assert (node assertion API)
  • BDD
    • expect
    • should
Mind the require:
  • 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;

Extension (plugins)

Curated list:

⚠️ **GitHub.com Fallback** ⚠️