Skip to content

Commit

Permalink
Found new type of address that worked, so added to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RoanPaulus committed Dec 18, 2024
1 parent 3da8490 commit 9837cfd
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 9837cfd

Please sign in to comment.