Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

chai test throw error

expect(model.get.bind(model, 'z')).to.throw('Property does not exist in model schema.');
expect(model.get.bind(model, 'z')).to.throw(new Error('Property does not exist in model schema.'));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #chai #test #throw #error
ADD COMMENT
Topic
Name
5+1 =