When connecting to the emulator from the SDK, SSL verification is disabled.
Follow these instructions to run the tests locally.
Traces
The documentdb module support tracing via the debug module. Traces will go to stderr by default. To enable tracing, you can set the DEBUG environment variable in a variety of ways.
documentdb:* will output all logs. This can be verbose, so it's helpful to filter on log level.
documentdb:<log level>:* will output all traces for a given <log level> value. The valid levels are error, warn, info, and debug.
documentdb:<log level>:<component> will output all traces for a given <log level> and <component>. The valid components are request and query.
You can combine filters via ,. So if you wanted to have error info for all components, but only debug info for query, then you'd use documentdb:error:*,documentdb:debug:query.
Using your command-line tool, from the root of your local copy of azure-documentdb-node repository:
(If you are contributing changes and submitting PR then you need to ensure that you run the tests against your local copy of the source, and not the published npm package.)
Remove documentdb, if previously installed
npm remove documentdb
Install documentdb
npm install source
Change to test directory
cd source\test
Run the tests
mocha -t 0 -R spec
If you just want to run the tests against the published npm package then skip steps #1 & #2 proceed directly to step #3