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.
Attachments
For Gerrit Dashboard: JSCBC-179 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
46304,2 | JSCBC-179: Add errors codes to Mock errors. | master | couchnode | Status: MERGED | +2 | +1 |