mirror of
https://github.com/gchq/CyberChef
synced 2026-01-05 18:13:15 +00:00
Add ToGeohash and FromGeohash operations
This commit is contained in:
34
test/tests/operations/ToGeohash.mjs
Normal file
34
test/tests/operations/ToGeohash.mjs
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* To Geohash tests
|
||||
*
|
||||
* @author gchq77703
|
||||
*
|
||||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "To Geohash",
|
||||
input: "37.8324,112.5584\n37.9324,-112.2584",
|
||||
expectedOutput: "ww8p1r4t8\n9w8pv3ruj",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "To Geohash",
|
||||
args: [9],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "To Geohash",
|
||||
input: "37.8324,112.5584\n\n\n",
|
||||
expectedOutput: "ww8p1r4t8\n\n\n",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "To Geohash",
|
||||
args: [9],
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
Reference in New Issue
Block a user