I have the following test:
it.only(\'validation should fail\', function(done) {
var body = {
title: \"dffdasfsdfsdafddfsadsa\",
description:
You can call assert.fail:
it("should return empty set of tags", function()
{
assert.fail("actual", "expected", "Error message");
});
Also, Mocha considers the test has failed if you call the done()
function with a parameter.
For example:
it("should return empty set of tags", function(done)
{
done(new Error("Some error message here"));
});
Though the first one looks clearer to me.