Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Wrapping a require in try / catch
let chai;
try {
chai = require('chai');
} catch (err) {}
if (chai) {
chai.assert.equal = function() {
throw new chai.AssertionError("Chai's assert.equal function does == instead of ===. Use assert.strictEqual instead");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment