Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions config/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ const venue_tags = [
'building+name',
'shop+name',
'office+name',
'public_transport+name',
'cuisine+name',
'railway~station+name',
'railway~tram_stop+name',
'railway~halt+name',
'railway~subway_entrance+name',
'railway~train_station_entrance+name',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"deep-diff": "^1.0.0",
"istanbul": "^0.4.3",
"jshint": "^2.10.3",
"json-diff": "^0.5.4",
"naivedb": "^1.0.7",
"pelias-mock-logger": "^1.0.1",
"precommit-hook": "^3.0.0",
Expand Down
2 changes: 0 additions & 2 deletions test/config/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ module.exports.tests.whitelist_venue_tags = function(test, common) {
t.true( features.venue_tags.includes('building+name') );
t.true( features.venue_tags.includes('shop+name') );
t.true( features.venue_tags.includes('office+name') );
t.true( features.venue_tags.includes('public_transport+name') );
t.true( features.venue_tags.includes('cuisine+name') );
t.true( features.venue_tags.includes('railway~tram_stop+name') );
t.true( features.venue_tags.includes('railway~station+name') );
t.true( features.venue_tags.includes('railway~halt+name') );
t.true( features.venue_tags.includes('railway~subway_entrance+name') );
Expand Down
12 changes: 4 additions & 8 deletions test/end-to-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var fs = require('fs'),
path = require('path'),
colors = require('colors'),
deep = require('deep-diff'),
jdiff = require('json-diff'),
streams = require('../stream/importPipeline'),
model = require('pelias-model'),
sink = require('through2-sink'),
Expand Down Expand Up @@ -79,25 +80,20 @@ streams.pbfParser()
var d = deep.diff(actual[i], expected[i]);
if (d) {
countDiff++;
console.log(jdiff.diffString(actual[i], expected[i]));
}
else {
countSame++;
}
i++;
}
var diff = deep.diff( actual, expected );

if (!diff) {
if (countDiff === 0) {
fs.unlinkSync('actual_output.json');
fs.unlinkSync('expected_output.json');
}

if( diff ){
//added for clarification because understanding the deep diff output is hard
console.log('actual:', JSON.stringify(actual[0], null, 2));
console.log('expected:', JSON.stringify(expected[0], null, 2));

console.log( JSON.stringify(diff, null, 2) );
if (countDiff > 0){
console.log('actual count:', actual.length);
console.log('expected count:', expected.length);
console.log('matching count:', colors.green(countSame));
Expand Down
Loading