Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Security Level: Public
Description
The mock library does not return Error Codes with the respinded errors. This prohibits effectively testing your production code against the mock, since tests like this fail:
couchbase.get(..., function(error,result) {
if (error.code == couchbase.errors.keyNotFound)
...
})
As a workaround, you currently have to test in addition for the error message returned by the mock. It is expected, that the mock also returnes CouchbaseErrors with the corresponding error codes set.