Browse Source

fix(tests): Sanitizer tests should use faked config

Otherwise a user's own pelias.json settings can cause tests to fail
pull/1204/head
Julian Simioni 6 years ago
parent
commit
76d88b62b4
No known key found for this signature in database
GPG Key ID: B9EEB0C6EE0910A1
  1. 14
      test/unit/sanitizer/_sources.js

14
test/unit/sanitizer/_sources.js

@ -1,5 +1,15 @@
var type_mapping = require('../../../helper/type_mapping');
var sanitizer = require( '../../../sanitizer/_targets' )('sources', type_mapping.source_mapping);
const fake_type_mapping = {
osm:['openstreetmap'],
oa: ['openaddresses'],
gn: ['geonames'],
wof: ['whosonfirst'],
openstreetmap:['openstreetmap'],
openaddresses: ['openaddresses'],
geonames: ['geonames'],
whosonfirst: ['whosonfirst']
};
var sanitizer = require( '../../../sanitizer/_targets' )('sources', fake_type_mapping);
var success_messages = { error: false };

Loading…
Cancel
Save