Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let { testCase, assert } = require('bocha');
let nock = require('nock');
let SmartDb = require('../lib/SmartDb.js');
module.exports = testCase('find', {
setUp() {
this.nock = nock('http://myserver.com');
},
tearDown() {
nock.cleanAll();
},
'can find with explicit selector': async function () {
this.nock
.post('/animals/_find', {
selector: {
name: 'Great white',
},
use_index: 'byName'
})
.reply(200, {
docs: [