@@ -125,7 +125,7 @@ describe("workspace engine telemetry builders", () => {
125125 [ "dbt" , new Map ( [ [ "dbt_run" , { } as any ] ] ) ] ,
126126 ] )
127127 const on : any = { enabled : true , shadowed, extensions : [ { integration : "x" , tools : [ ] } ] , workspaceId : "7" }
128- expect ( precedenceEvent ( on , { escapeHatch : false , connections : 1 } ) ) . toEqual (
128+ expect ( precedenceEvent ( on , { escapeHatch : false , connections : 1 , types : 2 } ) ) . toEqual (
129129 expect . objectContaining ( {
130130 type : "workspace_engine_precedence" ,
131131 enabled : true ,
@@ -136,20 +136,20 @@ describe("workspace engine telemetry builders", () => {
136136 workspace_id : 7 ,
137137 } ) ,
138138 )
139- expect ( trackPrecedence ( "s1" , on , { escapeHatch : false , connections : 1 } ) ) . toBe ( true )
140- expect ( trackPrecedence ( "s1" , on , { escapeHatch : false , connections : 1 } ) ) . toBe ( false ) // unchanged
141- expect ( trackPrecedence ( "s1" , on , { escapeHatch : false , connections : 2 } ) ) . toBe ( true ) // a connection was added locally
142- expect ( trackPrecedence ( "s2" , on , { escapeHatch : false , connections : 2 } ) ) . toBe ( true ) // another session
139+ expect ( trackPrecedence ( "s1" , on , { escapeHatch : false , connections : 1 , types : 2 } ) ) . toBe ( true )
140+ expect ( trackPrecedence ( "s1" , on , { escapeHatch : false , connections : 1 , types : 2 } ) ) . toBe ( false ) // unchanged
141+ expect ( trackPrecedence ( "s1" , on , { escapeHatch : false , connections : 2 , types : 2 } ) ) . toBe ( true ) // a connection was added locally
142+ expect ( trackPrecedence ( "s2" , on , { escapeHatch : false , connections : 2 , types : 2 } ) ) . toBe ( true ) // another session
143143 const off : any = { enabled : false , disabledReason : "escape-hatch" as const , shadowed : new Map ( ) , workspaceId : "7" }
144- expect ( trackPrecedence ( "s1" , off , { escapeHatch : true , connections : 0 } ) ) . toBe ( true )
144+ expect ( trackPrecedence ( "s1" , off , { escapeHatch : true , connections : 0 , types : 0 } ) ) . toBe ( true )
145145 expect ( events . at ( - 1 ) ) . toEqual (
146146 expect . objectContaining ( { enabled : false , reason : "escape-hatch" , shadowed_types : 0 , escape_hatch : true } ) ,
147147 )
148- expect ( trackPrecedence ( "s1" , off , { escapeHatch : false , connections : 0 } ) ) . toBe ( true ) // the hatch toggled
148+ expect ( trackPrecedence ( "s1" , off , { escapeHatch : false , connections : 0 , types : 0 } ) ) . toBe ( true ) // the hatch toggled
149149 // The same id under another account is another workspace: reported again.
150- expect ( trackPrecedence ( "s3" , on , { escapeHatch : false , connections : 1 , identity : "acme|7" } ) ) . toBe ( true )
151- expect ( trackPrecedence ( "s3" , on , { escapeHatch : false , connections : 1 , identity : "acme|7" } ) ) . toBe ( false )
152- expect ( trackPrecedence ( "s3" , on , { escapeHatch : false , connections : 1 , identity : "other|7" } ) ) . toBe ( true )
150+ expect ( trackPrecedence ( "s3" , on , { escapeHatch : false , connections : 1 , types : 2 , identity : "acme|7" } ) ) . toBe ( true )
151+ expect ( trackPrecedence ( "s3" , on , { escapeHatch : false , connections : 1 , types : 2 , identity : "acme|7" } ) ) . toBe ( false )
152+ expect ( trackPrecedence ( "s3" , on , { escapeHatch : false , connections : 1 , types : 2 , identity : "other|7" } ) ) . toBe ( true )
153153 expect ( ( events . at ( - 1 ) as any ) . escape_hatch ) . toBe ( false )
154154 } )
155155
0 commit comments