Skip to content

Commit

Permalink
Fix linebreak bug. Fixes #59
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Mar 23, 2016
1 parent 3ed449b commit 3f0efec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"hat": "0.0.3",
"invariant": "^2.2.1",
"polyline": "^0.1.0",
"rest": "^1.3.1",
"rest": "^1.3.2",
"xtend": "^4.0.0"
}
}
10 changes: 10 additions & 0 deletions test/geocoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ test('MapboxClient#geocodeForward', function(t) {
});
});

t.test('input with linebreak', function(t) {
var client = new MapboxClient(process.env.MapboxAccessToken);
t.ok(client);
client.geocodeForward('100 6th St\nSan Francisco', function(err, results) {
t.ifError(err);
t.deepEqual(geojsonhint.hint(results), [], 'results are valid');
t.end();
});
});

t.test('dataset option', function(t) {
var client = new MapboxClient(process.env.MapboxAccessToken);
t.ok(client);
Expand Down

0 comments on commit 3f0efec

Please sign in to comment.