Skip to content

Commit

Permalink
feat(airport_codes): increase popularity score for airports
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Apr 16, 2018
1 parent 0500159 commit 1ba3fc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions stream/tag_mapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ module.exports = function(){
if( iata ){
doc.setNameAlias( 'default', iata );
doc.setNameAlias( 'default', `${iata} Airport` );
doc.setPopularity(10000);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions test/stream/tag_mapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ module.exports.tests.airport_codes = function(test, common) {
stream.pipe( through.obj( function( doc, enc, next ){
t.equal(doc.getName('default'), 'test', 'correctly mapped');
t.deepEqual(doc.getNameAliases('default'), ['FOO', 'FOO Airport'], 'correctly mapped');
t.deepEqual(doc.getPopularity(), 10000);
t.end(); // test will fail if not called (or called twice).
next();
}));
Expand Down

0 comments on commit 1ba3fc0

Please sign in to comment.