Browse Source

Whitespace

pull/271/head
Julian Simioni 9 years ago
parent
commit
66e1cab007
  1. 1
      query/reverse.js
  2. 1
      query/search.js
  3. 1
      sanitiser/_geo_search.js
  4. 1
      sanitiser/_text.js
  5. 4
      test/unit/query/reverse.js
  6. 2
      test/unit/sanitiser/_geo_common.js
  7. 1
      test/unit/sanitiser/search.js

1
query/reverse.js

@ -1,4 +1,3 @@
var peliasQuery = require('pelias-query'),
defaults = require('./defaults');

1
query/search.js

@ -1,4 +1,3 @@
var peliasQuery = require('pelias-query'),
defaults = require('./defaults'),
textParser = require('./text_parser');

1
sanitiser/_geo_search.js

@ -1,4 +1,3 @@
var geo_common = require ('./_geo_common');
var LAT_LON_IS_REQUIRED = false;

1
sanitiser/_text.js

@ -1,4 +1,3 @@
var check = require('check-types'),
query_parser = require('../helper/query_parser');

4
test/unit/query/reverse.js

@ -21,6 +21,7 @@ module.exports.tests.query = function(test, common) {
t.deepEqual(compiled, expected, 'valid reverse query');
t.end();
});
test('valid query with radius', function(t) {
var query = generate({
lat: 29.49136, lon: -82.50622, boundary_circle_radius: 123
@ -32,6 +33,7 @@ module.exports.tests.query = function(test, common) {
t.deepEqual(compiled, expected, 'distance set to boundary circle radius');
t.end();
});
test('valid query with boundary.circle lat/lon/radius', function(t) {
var clean = {
lat: 29.49136,
@ -47,6 +49,7 @@ module.exports.tests.query = function(test, common) {
t.deepEqual(compiled, expected, 'point.lat/lon overrides boundary.circle.lat/lon');
t.end();
});
test('size fuzz test', function(t) {
// test different sizes
var sizes = [1,2,10,undefined,null];
@ -73,7 +76,6 @@ module.exports.tests.query = function(test, common) {
t.deepEqual(compiled, expected, 'valid reverse query with boundary.country');
t.end();
});
};
module.exports.all = function (tape, common) {

2
test/unit/sanitiser/_geo_common.js

@ -21,7 +21,7 @@ module.exports.tests.sanitize = function(test, common) {
};
var is_required = true;
var all_required = true;
sanitize.sanitize_boundary_circle(clean, params, is_required, all_required);
t.equal(clean.boundary_circle_lat, params['boundary.circle.lat'], 'lat approved');
t.equal(clean.boundary_circle_lon, params['boundary.circle.lon'], 'lon approved');

1
test/unit/sanitiser/search.js

@ -1,4 +1,3 @@
var search = require('../../../sanitiser/search'),
_text = require('../sanitiser/_text'),
parser = require('../../../helper/query_parser'),

Loading…
Cancel
Save