{"ScriptPreparationCode":null,"TestCases":[{"Name":"1","Code":"function removeFileNameInPath(path) {\r\n\tconst splitedPath = path.split(\u0027\\\\\u0027);\r\n\tconst resultPath = splitedPath.slice(0, splitedPath.length - 1).join(\u0027\\\\\u0027);\r\n\treturn resultPath;\r\n};\r\nconst test = removeFileNameInPath(\u0022C:\\\\test\\\\testbook\\\\testIncident\\\\iamorage\\\\test.exe\u0022)","IsDeferred":false},{"Name":"2","Code":"function removeFileNameInPath(path) {\r\n\tconst lastIndex = path.lastIndexOf(\u0027\\\\\u0027);\r\n \tif (lastIndex !== -1) {\r\n \t\treturn path.slice(0, lastIndex);\r\n \t} else {\r\n \t\treturn path;\r\n \t}\r\n};\r\nconst test2 = removeFileNameInPath(\u0022C:\\\\test\\\\testbook\\\\testIncident\\\\iamorage\\\\test.exe\u0022)","IsDeferred":false}]}