mirror of https://github.com/pelias/api.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
749 B
25 lines
749 B
8 years ago
|
var autocomplete = require('../../../sanitizer/autocomplete');
|
||
9 years ago
|
|
||
|
module.exports.tests = {};
|
||
|
|
||
8 years ago
|
module.exports.tests.sanitizers = function(test, common) {
|
||
|
test('check sanitizer list', function (t) {
|
||
9 years ago
|
var expected = [
|
||
|
'singleScalarParameters', 'text', 'tokenizer', 'size', 'layers', 'sources',
|
||
9 years ago
|
'sources_and_layers', 'private', 'geo_autocomplete', 'boundary_country', 'categories'
|
||
9 years ago
|
];
|
||
8 years ago
|
t.deepEqual(Object.keys(autocomplete.sanitizer_list), expected);
|
||
9 years ago
|
t.end();
|
||
|
});
|
||
|
};
|
||
|
|
||
|
module.exports.all = function (tape, common) {
|
||
|
function test(name, testFunction) {
|
||
|
return tape('SANTIZE /autocomplete ' + name, testFunction);
|
||
|
}
|
||
|
|
||
|
for( var testCase in module.exports.tests ){
|
||
|
module.exports.tests[testCase](test, common);
|
||
|
}
|
||
|
};
|