I'm currently in the process of creating a test for a function that accepts a map as an argument,
Under normal circumstances when the code is executed outside of a test, the parameter would appear like this (when calling toString):
Map { "id": "jobs", "label": "Jobs", "nodeType": "ROOT", "childNodesURI": "jobs?owner=*", "childIds": List [], "isFetchingChildren": false, "isToggled": true, "jobName": "" }
var node = {
id: "jobs",
label: "JES Jobs",
nodeType: "ROOT",
childNodesURI: "jobs?owner=*",
childIds: [],
isFetchingChildren: false,
isToggled: true,
jobName: "" };
console.log(node.get("id"));
Upon calling node.get("id"), I encounter the error message "TypeError: node.get is not a function"
I suspect this issue arises because there is no .get() function for a JSON object, although I'm not entirely certain... If my assumption is correct, how can I convert or initialize the JSON as a map?