@ -35,9 +35,14 @@ function _sanitize( raw, clean ){
return messages;
}
function _expected(){
return [{ name: 'text' }];
// export function
module.exports = () => ({
sanitize: _sanitize
sanitize: _sanitize,
expected: _expected
});
// this is the addressit functionality from https://github.com/pelias/text-analyzer/blob/master/src/addressItParser.js
@ -339,6 +339,12 @@ module.exports.tests.text_parser = function(test, common) {
test('return an array of valid parameters in object form for Joi schema validation', (t) => {
const expected = [{ name: 'text' }];
const validParameters = sanitizer.expected();
t.deepEquals(validParameters, expected);
t.end();
};
module.exports.all = function (tape, common) {