Skip to content

Commit

Permalink
Found new type of address that worked, so added to tests and fixed
Browse files Browse the repository at this point in the history
problem with it.
  • Loading branch information
RoanPaulus committed Dec 18, 2024
1 parent 3da8490 commit 96070ad
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/universal/helpers/bag.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('getLatLonByAddress', () => {
});
});

test('huisnummertoevoeging extracted with extra comma', () => {
test('huisnummertoevoeging extracted with trailing comma', () => {
expect(extractAddress('Herengracht 23-1,')).toStrictEqual({
openbareruimteNaam: 'Herengracht',
huisnummer: 23,
Expand All @@ -163,6 +163,15 @@ describe('getLatLonByAddress', () => {
});
});

test('Letter extracted as toevoeging', () => {
expect(extractAddress('Insulindeweg 26A')).toStrictEqual({
openbareruimteNaam: 'Insulindeweg',
huisnummer: 23,
huisnummertoevoeging: 'A',
huisletter: undefined,
});
});

test('Ignores postcal code, city name and random charcters', () => {
expect(
extractAddress('Straatnaam 1, 1015BA, Amsterdam _ ; ,')
Expand Down

0 comments on commit 96070ad

Please sign in to comment.