@Test public void test_non_existing_node_file_deprecated_key() throws Exception { MapSettings settings = new MapSettings(); settings.setProperty("sonar.typescript.node", "non-existing-file"); NodeCommandBuilder nodeCommand = NodeCommand.builder(mockProcessWrapper) .configuration(settings.asConfig()) .script("not-used"); assertThatThrownBy(nodeCommand::build) .isInstanceOf(NodeCommandException.class) .hasMessage("Provided Node.js executable file does not exist."); await().until(() -> logTester.logs(LoggerLevel.ERROR) .contains("Provided Node.js executable file does not exist. Property 'sonar.typescript.node' was to 'non-existing-file'")); }
public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); }
NodeCommand { public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); } }
NodeCommand { public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); } NodeCommand(ProcessWrapper processWrapper, String nodeExecutable, int actualNodeVersion, List<String> nodeJsArgs, @Nullable String scriptFilename,
    List<String> args,
    Consumer<String> outputConsumer,
    Consumer<String> errorConsumer); }
NodeCommand { public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); } NodeCommand(ProcessWrapper processWrapper, String nodeExecutable, int actualNodeVersion, List<String> nodeJsArgs, @Nullable String scriptFilename,
    List<String> args,
    Consumer<String> outputConsumer,
    Consumer<String> errorConsumer); void start(); int waitFor(); @Override String toString(); int getActualNodeVersion(); static NodeCommandBuilder builder(); }
NodeCommand { public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); } NodeCommand(ProcessWrapper processWrapper, String nodeExecutable, int actualNodeVersion, List<String> nodeJsArgs, @Nullable String scriptFilename,
    List<String> args,
    Consumer<String> outputConsumer,
    Consumer<String> errorConsumer); void start(); int waitFor(); @Override String toString(); int getActualNodeVersion(); static NodeCommandBuilder builder();  }