Skip to content

Commit 09b6e97

Browse files
committed
test: additional test cases to cover PR behaviour
1 parent d250f67 commit 09b6e97

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

test/address.esp.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ const testcase = (test, common) => {
66
{ postcode: '08011' }, { locality: 'Barcelona' }
77
])
88

9+
// note: the desired behavior here is to not include the 'B' in the housenumber
10+
// as it is more likely to be part of the administrative unit.
11+
assert('Calle Principal 20 B', [
12+
{ street: 'Calle Principal' }, { housenumber: '20' }
13+
])
14+
915
assert('Calle Principal 20 Barcelona', [
1016
{ street: 'Calle Principal' }, { housenumber: '20' },
1117
{ locality: 'Barcelona' }

test/address.fra.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ const testcase = (test, common) => {
133133
{ locality: 'Châtillon' },
134134
{ country: 'France' }
135135
])
136+
assert(`1 bis Rue Ballainvilliers 63000 Clermont-Ferrand`, [
137+
{ housenumber: '1 bis' },
138+
{ street: 'Rue Ballainvilliers' },
139+
{ postcode: '63000' },
140+
{ locality: 'Clermont-Ferrand' }
141+
])
136142
}
137143

138144
module.exports.all = (tape, common) => {

test/address.usa.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ const testcase = (test, common) => {
293293

294294
// https://github.com/pelias/parser/pull/179
295295
assert('10 A Main Street', [
296-
{ housenumber: '10 A' },
297-
{ street: 'Main Street' }
296+
{ housenumber: '10' },
297+
{ street: 'A Main Street' }
298298
])
299299
}
300300

0 commit comments

Comments
 (0)