-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(transit): support for parsing transit stop ids, additional dicti…
…onary updates (#38)
- Loading branch information
1 parent
94c9b4a
commit 4eae07c
Showing
5 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
temple | ||
temple | ||
cathedral | ||
stop | ||
!dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ sf | |
!university | ||
!hospital | ||
!temple | ||
!cathedral | ||
!airport | ||
!deli | ||
!us | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const AddressParser = require('../parser/AddressParser') | ||
|
||
const testcase = (test, common) => { | ||
let parser = new AddressParser() | ||
let assert = common.assert.bind(null, test, parser) | ||
|
||
assert('Stop 1', [ | ||
{ place: 'Stop 1' } | ||
], true) | ||
|
||
assert('Stop 10010', [ | ||
{ place: 'Stop 10010' } | ||
], true) | ||
} | ||
|
||
module.exports.all = (tape, common) => { | ||
function test (name, testFunction) { | ||
return tape(`Transit: ${name}`, testFunction) | ||
} | ||
|
||
testcase(test, common) | ||
} |