(#1330) fixed the bug to make test.basics.js test passed when using Cloudant

(#1330) fixed the bug to make test.basics.js test passed when using Cloudant