Nodejs Unittest

What is the correct way to create a unittest for couchbase?
I know that there is a require(‘couchbase’).Mock but

What is the benefit of mocking if partialy supported

How can I create a unit test for there queries? Must I have a real database and unittest bucket for it?

Hey @socketman2016,

In most cases, you can run a test cluster and use our cluster management facilities to set up the buckets according to your needs prior to running the unit tests. The mock provides much of our functionality to enable you unit test quickly locally, however there is no simple implementation possible for something like Spatial Views or N1QL, and thus it is not supported by the internal Mock.

Cheers, Brett