Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/us_street/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Client {

if (dataIsLookup) {
if (data.maxCandidates == null && data.match == "enhanced")
data.maxCandidates = 5;
data.maxCandidates = 1;
batch = new Batch();
batch.add(data);
} else {
Expand Down
4 changes: 2 additions & 2 deletions tests/us_street/test_Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ describe("A US Street client", function () {
expect(mockSender.request.parameters).to.deep.equal(expectedParameters);
});

it("defaults maxCandidates to 5 when match type is enhanced.", function () {
it("defaults maxCandidates to 1 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,
candidates: 1,
};

client.send(lookup);
Expand Down