use of jenkins.plugins.nodejs.tools.NodeJSInstaller in project configuration-as-code-plugin by jenkinsci.
the class NodeJSTest method configure_nodejs.
@Test
@ConfiguredWithReadme("nodejs/README.md")
public void configure_nodejs() {
final NodeJSInstallation.DescriptorImpl descriptor = ExtensionList.lookupSingleton(NodeJSInstallation.DescriptorImpl.class);
assertEquals(1, descriptor.getInstallations().length);
final NodeJSInstallation nodejs = descriptor.getInstallations()[0];
final InstallSourceProperty installSourceProperty = nodejs.getProperties().get(InstallSourceProperty.class);
final NodeJSInstaller nodeJSInstaller = installSourceProperty.installers.get(NodeJSInstaller.class);
assertEquals("12.11.1", nodeJSInstaller.id);
assertEquals(48, nodeJSInstaller.getNpmPackagesRefreshHours().longValue());
}
Aggregations