use of org.eclipse.che.plugin.nodejsdbg.server.NodeJsOutput in project che by eclipse.
the class NodeJsStepParserTest method testParse.
@Test
public void testParse() throws Exception {
NodeJsOutput nodeJsOutput = NodeJsOutput.of("break in module.js:559\n" + " 557 if (depth === 0) stat.cache = null;\n" + " 558 return result;\n" + ">559 };\n" + " 560 \n" + " 561");
Location location = parser.parse(nodeJsOutput);
assertEquals(location.getTarget(), "module.js");
assertEquals(location.getLineNumber(), 559);
}
use of org.eclipse.che.plugin.nodejsdbg.server.NodeJsOutput in project che by eclipse.
the class NodeJsBackTraceParserTest method testParse.
@Test(dataProvider = "parse")
public void testParse(String output, String script, int line) throws Exception {
NodeJsOutput nodeJsOutput = NodeJsOutput.of(output);
Location location = parser.parse(nodeJsOutput);
assertEquals(location.getTarget(), script);
assertEquals(location.getLineNumber(), line);
}
Aggregations