Browse Source

typo: delete mentions of joi in sanitizers

pull/942/head
Lily He 8 years ago
parent
commit
279b70b7d7
  1. 2
      sanitizer/_size.js
  2. 2
      sanitizer/sanitizeAll.js
  3. 2
      test/unit/sanitizer/_boundary_country.js
  4. 2
      test/unit/sanitizer/_categories.js
  5. 2
      test/unit/sanitizer/_flag_bool.js
  6. 2
      test/unit/sanitizer/_ids.js
  7. 2
      test/unit/sanitizer/_size.js
  8. 2
      test/unit/sanitizer/_sources_and_layers.js
  9. 2
      test/unit/sanitizer/_synthesize_analysis.js
  10. 2
      test/unit/sanitizer/_text_addressit.js
  11. 5
      test/unit/sanitizer/sanitizeAll.js

2
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' }];
}
};

2
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)

2
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);

2
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();

2
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);

2
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);

2
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);

2
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);

2
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' },

2
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);

5
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'
}];

Loading…
Cancel
Save