smartystreets-javascript-sdk
Advanced tools
Comparing version 1.11.7 to 1.11.8
{ | ||
"name": "smartystreets-javascript-sdk", | ||
"version": "1.11.7", | ||
"version": "1.11.8", | ||
"description": "Quick and easy SmartyStreets address validation.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -31,2 +31,4 @@ const Candidate = require("./Candidate"); | ||
if (dataIsLookup) { | ||
if (data.maxCandidates == null && data.match == "enhanced") | ||
data.maxCandidates = 5; | ||
batch = new Batch(); | ||
@@ -33,0 +35,0 @@ batch.add(data); |
@@ -55,2 +55,17 @@ const chai = require("chai"); | ||
it("defaults maxCandidates to 5 when match type is enhanced.", function () { | ||
let mockSender = new MockSender(); | ||
const client = new Client(mockSender); | ||
let lookup = new Lookup(); | ||
lookup.match = "enhanced"; | ||
let expectedParameters = { | ||
match: "enhanced", | ||
candidates: 5, | ||
}; | ||
client.send(lookup); | ||
expect(mockSender.request.parameters).to.deep.equal(expectedParameters); | ||
}); | ||
it("doesn't send an empty batch.", function () { | ||
@@ -57,0 +72,0 @@ let mockSender = new MockSender(); |
Sorry, the diff of this file is not supported yet
167481
3835