File tree Expand file tree Collapse file tree
apps/console/src/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,14 +109,16 @@ describe('MSW Server Integration', () => {
109109
110110 // Seed data defines _id "101" for the first opportunity.
111111 // After syncDriverIds, id must equal _id (both "101").
112- const first = opportunities . find ( ( r : any ) => r . _id === '101' ) ;
113- expect ( first ) . toBeDefined ( ) ;
114- expect ( first . id ) . toBe ( '101' ) ;
115- expect ( first . _id ) . toBe ( '101' ) ;
112+ const targetOpportunity = opportunities . find ( ( r : any ) => r . _id === '101' ) ;
113+ expect ( targetOpportunity ) . toBeDefined ( ) ;
114+ expect ( targetOpportunity . id ) . toBe ( '101' ) ;
115+ expect ( targetOpportunity . _id ) . toBe ( '101' ) ;
116116 } ) ;
117117
118118 it ( 'should fetch a seed record by _id via HTTP' , async ( ) => {
119- // GET /data/opportunity/101 — uses the stable seed _id
119+ // GET /data/opportunity/101 — uses the stable seed _id.
120+ // Response may be wrapped in { success, data: { record } } (HttpDispatcher)
121+ // or returned as { record } (direct protocol).
120122 const res = await fetch ( 'http://localhost/api/v1/data/opportunity/101' ) ;
121123 expect ( res . ok ) . toBe ( true ) ;
122124 const body = await res . json ( ) ;
You can’t perform that action at this time.
0 commit comments