From 279b70b7d7f7b6781e99d8f7dfa32b4169daabc0 Mon Sep 17 00:00:00 2001 From: Lily He Date: Fri, 28 Jul 2017 16:06:34 -0400 Subject: [PATCH] typo: delete mentions of joi in sanitizers --- sanitizer/_size.js | 2 +- sanitizer/sanitizeAll.js | 2 +- test/unit/sanitizer/_boundary_country.js | 2 +- test/unit/sanitizer/_categories.js | 2 +- test/unit/sanitizer/_flag_bool.js | 2 +- test/unit/sanitizer/_ids.js | 2 +- test/unit/sanitizer/_size.js | 2 +- test/unit/sanitizer/_sources_and_layers.js | 2 +- test/unit/sanitizer/_synthesize_analysis.js | 2 +- test/unit/sanitizer/_text_addressit.js | 2 +- test/unit/sanitizer/sanitizeAll.js | 5 ++--- 11 files changed, 12 insertions(+), 13 deletions(-) diff --git a/sanitizer/_size.js b/sanitizer/_size.js index aaced3f9..614412d0 100644 --- a/sanitizer/_size.js +++ b/sanitizer/_size.js @@ -41,7 +41,7 @@ function _setup( size_min, size_max, size_def ){ }, expected: function _expected() { - // add size as a valid parameter for joi + // add size as a valid parameter return [{ name: 'size' }]; } }; diff --git a/sanitizer/sanitizeAll.js b/sanitizer/sanitizeAll.js index dafa1cb8..47861737 100644 --- a/sanitizer/sanitizeAll.js +++ b/sanitizer/sanitizeAll.js @@ -30,7 +30,7 @@ function sanitize( req, sanitizers, cb ){ return cb( undefined, req.clean ); } -// Adds to schemaKeys every acceptable parameter passed through API call +// Adds to goodParameters every acceptable parameter passed through API call function checkParameters(req, sanitizers, cb) { // source of input parameters // (in this case from the GET querystring params) diff --git a/test/unit/sanitizer/_boundary_country.js b/test/unit/sanitizer/_boundary_country.js index 7649da66..3db2a4d3 100644 --- a/test/unit/sanitizer/_boundary_country.js +++ b/test/unit/sanitizer/_boundary_country.js @@ -66,7 +66,7 @@ module.exports.tests.sanitize_boundary_country = function(test, common) { t.end(); }); - test('return an array of valid parameters in object form for Joi schema validation', (t) => { + test('return an array of expected parameters in object form for validation', (t) => { const expected = [{ name: 'boundary.country' }]; const validParameters = sanitizer.expected(); t.deepEquals(validParameters, expected); diff --git a/test/unit/sanitizer/_categories.js b/test/unit/sanitizer/_categories.js index 84589098..0c7dbe59 100644 --- a/test/unit/sanitizer/_categories.js +++ b/test/unit/sanitizer/_categories.js @@ -158,7 +158,7 @@ module.exports.tests.invalid_categories = function(test, common) { t.end(); }); - test('return an array of valid parameters in object form for Joi schema validation', (t) => { + test('return an array of expected parameters in object form for validation', (t) => { const expected = [{ name: 'categories' }]; const validParameters = sanitizer.expected(); diff --git a/test/unit/sanitizer/_flag_bool.js b/test/unit/sanitizer/_flag_bool.js index 04e31f49..193e8234 100644 --- a/test/unit/sanitizer/_flag_bool.js +++ b/test/unit/sanitizer/_flag_bool.js @@ -52,7 +52,7 @@ module.exports.tests.validate_default_behavior = function(test, common) { }; module.exports.tests.check_valid_parameters = function(test, common) { - test('return an array of valid parameters in object form for Joi schema validation', (t) => { + test('return an array of expected parameters in object form for validation', (t) => { const expected = [{ name: 'private' }]; const validParameters = sanitizer('dirty_param', true).expected(); t.deepEquals(validParameters, expected); diff --git a/test/unit/sanitizer/_ids.js b/test/unit/sanitizer/_ids.js index f376c2ca..bf82ec8e 100644 --- a/test/unit/sanitizer/_ids.js +++ b/test/unit/sanitizer/_ids.js @@ -205,7 +205,7 @@ module.exports.tests.de_dupe = function(test, common) { }; module.exports.tests.valid_Parameters = function(test, common) { - test('return an array of valid parameters in object form for Joi schema validation', (t) => { + test('return an array of expected parameters in object form for validation', (t) => { const expected = [{ name: 'ids' }]; const validParameters = sanitizer.expected(); t.deepEquals(validParameters, expected); diff --git a/test/unit/sanitizer/_size.js b/test/unit/sanitizer/_size.js index 0bd1e415..7b3a9e35 100644 --- a/test/unit/sanitizer/_size.js +++ b/test/unit/sanitizer/_size.js @@ -35,7 +35,7 @@ module.exports.tests.sanitize_size = function(test, common) { t.end(); }); - test('return an array of valid parameters in object form for Joi schema validation', function(t) { + test('return an array of expected parameters in object form for validation', function(t) { const expected = [{ name: 'size' }]; const validParameters = sanitizer(/*defaults*/).expected(); t.deepEquals(validParameters, expected); diff --git a/test/unit/sanitizer/_sources_and_layers.js b/test/unit/sanitizer/_sources_and_layers.js index b0266095..0a936b21 100644 --- a/test/unit/sanitizer/_sources_and_layers.js +++ b/test/unit/sanitizer/_sources_and_layers.js @@ -106,7 +106,7 @@ test('valid combination', function(t) { t.end(); }); - test('return an array of valid parameters in object form for Joi schema validation', function (t) { + test('return an array of expected parameters in object form for validation', function (t) { const expected = [{ 'name': 'sources' }, { 'name': 'layers' }]; const validParameters = sanitizer.expected(); t.deepEquals(validParameters, expected); diff --git a/test/unit/sanitizer/_synthesize_analysis.js b/test/unit/sanitizer/_synthesize_analysis.js index fd13b947..287b0e0d 100644 --- a/test/unit/sanitizer/_synthesize_analysis.js +++ b/test/unit/sanitizer/_synthesize_analysis.js @@ -233,7 +233,7 @@ module.exports.tests.text_parser = function(test, common) { }); - test('return an array of valid parameters in object form for Joi schema validation', function (t) { + test('return an array of expected parameters in object form for validation', function (t) { const sanitizer = require('../../../sanitizer/_synthesize_analysis'); const expected = [ { 'name': 'venue' }, diff --git a/test/unit/sanitizer/_text_addressit.js b/test/unit/sanitizer/_text_addressit.js index c5291635..5fad89a8 100644 --- a/test/unit/sanitizer/_text_addressit.js +++ b/test/unit/sanitizer/_text_addressit.js @@ -339,7 +339,7 @@ module.exports.tests.text_parser = function(test, common) { }); - test('return an array of valid parameters in object form for Joi schema validation', (t) => { + test('return an array of expected parameters in object form for validation', (t) => { const expected = [{ name: 'text' }]; const validParameters = sanitizer.expected(); t.deepEquals(validParameters, expected); diff --git a/test/unit/sanitizer/sanitizeAll.js b/test/unit/sanitizer/sanitizeAll.js index 5e81aada..53bd0c30 100644 --- a/test/unit/sanitizer/sanitizeAll.js +++ b/test/unit/sanitizer/sanitizeAll.js @@ -1,5 +1,4 @@ var sanitizeAll = require('../../../sanitizer/sanitizeAll'); -const Joi = require('joi'); module.exports.tests = {}; @@ -171,7 +170,7 @@ module.exports.tests.all = function(test, common) { var sanitizers = { 'first': { expected: function _expected () { - // add value as a valid parameter for joi + // add value as a valid parameter return [{ name: 'value' }]; @@ -198,7 +197,7 @@ module.exports.tests.all = function(test, common) { var sanitizers = { 'first': { expected: function _expected () { - // add value as a valid parameter for joi + // add value as a valid parameter return [{ name: 'value' }];