I would like to use custom error message with Should.JS and while searching for solutions I came across this answer Apparently should does not support custom error messages at the moment
Currently I have been using Should.js version 3.3.2 and my code to use it is as follows.
var should = require('should');
Following the examples found in Chai documentation, I have changed my code to be the following.
var chai = require('chai');
var should = chai.should();
Having done so, I now have a bunch of broken tests and chai.should() is the culprit.
I kind of expected that chai.should() was really just a wrapper for Should.js and that it added filters/inteceptors so that you could configure useful extensions but when I inspect the object created by require('chai').should()
against require('should')
I notice that they are totally different api's
Here is some logging Code
var chai = require('chai');
var should = chai.should();
l.line('require("chai").should()');
l.inspect(should);
l.line('require("should")');
var shouldOriginal = require('should');
l.inspect(shouldOriginal);
console.log('----------------------------------------');
Log Output
Tests are now failing on Should
Please note that my real goal is just adding custom error messages to Should.JS