From 3f0efec764bcf521b5f31cf55e277fd9f32e0975 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 23 Mar 2016 16:31:36 -0400 Subject: [PATCH] Fix linebreak bug. Fixes #59 --- package.json | 2 +- test/geocoding.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index fecfb08e..1e33987f 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/test/geocoding.js b/test/geocoding.js index 1c5f8145..6ed4fb95 100644 --- a/test/geocoding.js +++ b/test/geocoding.js @@ -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);