@@ -60,6 +60,13 @@ describe("computeSourceValues", () => {
6060 const values = computeSourceValues ( [ config ( "github" , "issue" , true ) ] ) ;
6161 expect ( values . github ) . toBe ( true ) ;
6262 } ) ;
63+
64+ it ( "enables health_checks when its config is enabled" , ( ) => {
65+ const values = computeSourceValues ( [
66+ config ( "health_checks" , "health_issue" , true ) ,
67+ ] ) ;
68+ expect ( values . health_checks ) . toBe ( true ) ;
69+ } ) ;
6370} ) ;
6471
6572describe ( "deriveSourceStates" , ( ) => {
@@ -106,6 +113,17 @@ describe("SignalSourceService.toggleSource", () => {
106113 expect ( client . createSignalSourceConfig ) . toHaveBeenCalledTimes ( 1 ) ;
107114 } ) ;
108115
116+ it ( "creates a health_checks config with the health_issue source type" , async ( ) => {
117+ const client = fakeClient ( ) ;
118+ const service = new SignalSourceService ( ) ;
119+ await service . toggleSource ( client , 1 , "health_checks" , true , [ ] , [ ] ) ;
120+ expect ( client . createSignalSourceConfig ) . toHaveBeenCalledWith ( 1 , {
121+ source_product : "health_checks" ,
122+ source_type : "health_issue" ,
123+ enabled : true ,
124+ } ) ;
125+ } ) ;
126+
109127 it ( "ensures the issues table syncs with full_refresh for github before enabling" , async ( ) => {
110128 const client = fakeClient ( ) ;
111129 const service = new SignalSourceService ( ) ;
0 commit comments