@@ -953,33 +953,42 @@ describe("WebSocket Server", () => {
953953
954954 const firstResponse = await sendRequest ( ws , WS_METHODS . serverGetConfig ) ;
955955 const secondResponse = await sendRequest ( ws , WS_METHODS . serverGetConfig ) ;
956+ const firstResult = firstResponse . result as
957+ | { readonly providers ?: ReadonlyArray < { readonly checkedAt ?: string } > }
958+ | undefined ;
959+ const secondResult = secondResponse . result as
960+ | { readonly providers ?: ReadonlyArray < { readonly checkedAt ?: string } > }
961+ | undefined ;
962+ const firstProvider = firstResult ?. providers ?. [ 0 ] ;
963+ const secondProvider = secondResult ?. providers ?. [ 0 ] ;
956964
957965 expect ( firstResponse . result ) . toEqual (
958966 expect . objectContaining ( {
959- providers : [
960- {
967+ providers : expect . arrayContaining ( [
968+ expect . objectContaining ( {
961969 provider : "codex" ,
962970 status : "ready" ,
963971 available : true ,
964972 authStatus : "authenticated" ,
965- checkedAt : "2026-01-01T00:00:02.000Z" ,
966- } ,
967- ] ,
973+ } ) ,
974+ ] ) ,
968975 } ) ,
969976 ) ;
970977 expect ( secondResponse . result ) . toEqual (
971978 expect . objectContaining ( {
972- providers : [
973- {
979+ providers : expect . arrayContaining ( [
980+ expect . objectContaining ( {
974981 provider : "codex" ,
975982 status : "error" ,
976983 available : false ,
977984 authStatus : "unauthenticated" ,
978- checkedAt : "2026-01-01T00:00:03.000Z" ,
979- } ,
980- ] ,
985+ } ) ,
986+ ] ) ,
981987 } ) ,
982988 ) ;
989+ expect ( firstProvider ?. checkedAt ) . toEqual ( expect . any ( String ) ) ;
990+ expect ( secondProvider ?. checkedAt ) . toEqual ( expect . any ( String ) ) ;
991+ expect ( firstProvider ?. checkedAt ) . not . toEqual ( secondProvider ?. checkedAt ) ;
983992 } ) ;
984993
985994 it ( "bootstraps default keybindings file when missing" , async ( ) => {
0 commit comments