@@ -58,7 +58,7 @@ describe("doctor open-policy allowFrom repair", () => {
5858 expect ( GoogleChatConfigSchema . safeParse ( result . config . channels ?. googlechat ) . success ) . toBe ( true ) ;
5959 } ) ;
6060
61- it . each ( [
61+ it . each < { label : string ; config : GoogleChatConfig } > ( [
6262 {
6363 label : "root" ,
6464 config : { dmPolicy : "open" , allowFrom : [ "*" ] } ,
@@ -83,20 +83,15 @@ describe("doctor open-policy allowFrom repair", () => {
8383 accounts : { work : { dmPolicy : "open" , allowFrom : [ "*" ] } } ,
8484 } ,
8585 } ,
86- ] satisfies Array < { label : string ; config : GoogleChatConfig } > ) (
87- "preserves schema-valid googlechat $label DM access" ,
88- ( { config } ) => {
89- expect ( GoogleChatConfigSchema . safeParse ( config ) . success ) . toBe ( true ) ;
90-
91- const result = maybeRepairOpenPolicyAllowFrom ( { channels : { googlechat : config } } ) ;
92-
93- expect ( result . changes ) . toEqual ( [ ] ) ;
94- expect ( result . config . channels ?. googlechat ) . toEqual ( config ) ;
95- expect ( GoogleChatConfigSchema . safeParse ( result . config . channels ?. googlechat ) . success ) . toBe (
96- true ,
97- ) ;
98- } ,
99- ) ;
86+ ] ) ( "preserves schema-valid googlechat $label DM access" , ( { config } ) => {
87+ expect ( GoogleChatConfigSchema . safeParse ( config ) . success ) . toBe ( true ) ;
88+
89+ const result = maybeRepairOpenPolicyAllowFrom ( { channels : { googlechat : config } } ) ;
90+
91+ expect ( result . changes ) . toEqual ( [ ] ) ;
92+ expect ( result . config . channels ?. googlechat ) . toEqual ( config ) ;
93+ expect ( GoogleChatConfigSchema . safeParse ( result . config . channels ?. googlechat ) . success ) . toBe ( true ) ;
94+ } ) ;
10095
10196 it ( "repairs nested-only matrix dm allowFrom" , ( ) => {
10297 const result = maybeRepairOpenPolicyAllowFrom ( {
0 commit comments