fix: jsonata $base64decode/$base64encode in Web Worker (#2275)
This commit is contained in:
@@ -218,6 +218,7 @@ module.exports = {
|
||||
testOpHtml(browser, "JSON Beautify", "{a:1}", ".json-dict .json-literal", "1");
|
||||
// testOp(browser, "JSON Minify", "test input", "test_output");
|
||||
// testOp(browser, "JSON to CSV", "test input", "test_output");
|
||||
testOp(browser, "Jsonata Query", '{"a": "SGVsbG8gV29ybGQh"}', '"Hello World!"', ["$base64decode($.a)"]);
|
||||
// testOp(browser, "JWT Decode", "test input", "test_output");
|
||||
// testOp(browser, "JWT Sign", "test input", "test_output");
|
||||
// testOp(browser, "JWT Verify", "test input", "test_output");
|
||||
|
||||
@@ -548,4 +548,27 @@ TestRegister.addTests([
|
||||
},
|
||||
],
|
||||
},
|
||||
// Base64 functions (issue #2063)
|
||||
{
|
||||
name: "Jsonata: $base64decode",
|
||||
input: "{}",
|
||||
expectedOutput: '"Hello World!"',
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Jsonata Query",
|
||||
args: ['$base64decode("SGVsbG8gV29ybGQh")'],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Jsonata: $base64encode",
|
||||
input: "{}",
|
||||
expectedOutput: '"SGVsbG8gV29ybGQh"',
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Jsonata Query",
|
||||
args: ['$base64encode("Hello World!")'],
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user