This commit is contained in:
jpledref 2024-02-04 00:33:35 -08:00 committed by GitHub
commit a944535dec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,24 @@
/**
* XML to JSON tests.
*
* @author jpledref [jp.ledref@gmail.com]
* @copyright Crown Copyright 2023
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
const EXPECTED_JSON = { "root": {"shelf": ["over"], "wood": ["do"], "natural": ["sale"]}};
TestRegister.addTests([
{
name: "XML to JSON",
input: "<root>\n<shelf>over</shelf>\n<wood>do</wood>\n<natural>sale</natural>\n</root>",
expectedOutput: EXPECTED_JSON,
recipeConfig: [
{
op: "XML to JSON",
args: []
},
],
}
]);