diff --git a/sonar-plugin/sonar-javascript-plugin/src/test/java/org/sonar/plugins/javascript/analysis/JavaScriptEslintBasedSensorTest.java b/sonar-plugin/sonar-javascript-plugin/src/test/java/org/sonar/plugins/javascript/analysis/JavaScriptEslintBasedSensorTest.java index 6c06b2a915..cc36ef4a6f 100644 --- a/sonar-plugin/sonar-javascript-plugin/src/test/java/org/sonar/plugins/javascript/analysis/JavaScriptEslintBasedSensorTest.java +++ b/sonar-plugin/sonar-javascript-plugin/src/test/java/org/sonar/plugins/javascript/analysis/JavaScriptEslintBasedSensorTest.java @@ -148,6 +148,9 @@ public void setUp() throws Exception { ); tsProgram = new TsProgram("", new ArrayList<>(), List.of()); when(bridgeServerMock.createProgram(any())).thenReturn(tsProgram); + when(bridgeServerMock.getTelemetry()).thenReturn( + new TelemetryData(List.of(), new RuntimeTelemetry(Version.create(22, 9), "host")) + ); context = SensorContextTester.create(baseDir); context.fileSystem().setWorkDir(workDir); context.setRuntime( diff --git a/sonar-plugin/sonar-javascript-plugin/src/test/java/org/sonar/plugins/javascript/analysis/JsTsSensorTest.java b/sonar-plugin/sonar-javascript-plugin/src/test/java/org/sonar/plugins/javascript/analysis/JsTsSensorTest.java index bb4da3c173..f55ebb58e0 100644 --- a/sonar-plugin/sonar-javascript-plugin/src/test/java/org/sonar/plugins/javascript/analysis/JsTsSensorTest.java +++ b/sonar-plugin/sonar-javascript-plugin/src/test/java/org/sonar/plugins/javascript/analysis/JsTsSensorTest.java @@ -152,6 +152,12 @@ public void setUp() throws Exception { when(bridgeServerMock.isAlive()).thenReturn(true); when(bridgeServerMock.analyzeTypeScript(any())).thenReturn(new AnalysisResponse()); when(bridgeServerMock.getCommandInfo()).thenReturn("bridgeServerMock command info"); + when(bridgeServerMock.getTelemetry()).thenReturn( + new BridgeServer.TelemetryData( + List.of(), + new BridgeServer.RuntimeTelemetry(Version.create(22, 9), "host") + ) + ); when(bridgeServerMock.loadTsConfig(any())).thenAnswer(invocationOnMock -> { String tsConfigPath = (String) invocationOnMock.getArguments()[0]; FilePredicates predicates = context.fileSystem().predicates();