|
|
@ -498,11 +498,12 @@ module.exports.tests.geojsonify_place_details = (test, common) => { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('category property should not be output when params does not contain \'category\' property', t => { |
|
|
|
test('category property should be output even when params does not contain \'category\' property', t => { |
|
|
|
const source = { |
|
|
|
const source = { |
|
|
|
category: [ 1, 2 ] |
|
|
|
category: [ 1, 2 ] |
|
|
|
}; |
|
|
|
}; |
|
|
|
const expected = { |
|
|
|
const expected = { |
|
|
|
|
|
|
|
category: [ 1, 2 ] |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const clean = {}; |
|
|
|
const clean = {}; |
|
|
@ -514,11 +515,12 @@ module.exports.tests.geojsonify_place_details = (test, common) => { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('category property should not be output when params is not an object', t => { |
|
|
|
test('category property should be output when params is not an object', t => { |
|
|
|
const source = { |
|
|
|
const source = { |
|
|
|
category: [ 1, 2 ] |
|
|
|
category: [ 1, 2 ] |
|
|
|
}; |
|
|
|
}; |
|
|
|
const expected = { |
|
|
|
const expected = { |
|
|
|
|
|
|
|
category: [ 1, 2 ] |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const clean = 'this is not an object'; |
|
|
|
const clean = 'this is not an object'; |
|
|
|