When the following is not satisfied:
it('should call response.header with expected arguments', function(){
let response = chai.spy.object([ 'header' ]);
let responseBuilder = new ResponseBuilder(response);
responseBuilder
.addHeaderByKeyValue('Access-Control-Allow-Origin', '*')
.build({});
expect(response.header).to.have.been.called.with({
'Access-Control-Allow-Origin': '*'
});
});
It yields the below error:
AssertionError: expected { Spy 'object.header', 1 call } to have been called with [ Array(1) ]
This is not particularly helpful in seeing where the assertion actually failed, whilst the above error is correct, is there any mechanism or switch to make this more 'verbose'? If not, could this be a feature request?
When the following is not satisfied:
It yields the below error:
AssertionError: expected { Spy 'object.header', 1 call } to have been called with [ Array(1) ]This is not particularly helpful in seeing where the assertion actually failed, whilst the above error is correct, is there any mechanism or switch to make this more 'verbose'? If not, could this be a feature request?