File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -281,16 +281,14 @@ export function createIntegrationTestsSuite(
281281 } ) ;
282282 const content = result . content as { text : string } [ ] ;
283283 expect ( content . length ) . toBe ( 1 ) ;
284- const resultJson = JSON . parse ( content [ 0 ] . text ) ;
285- const { actors } = resultJson ;
286- expect ( actors . length ) . toBe ( resultJson . total ) ;
287- expect ( actors . length ) . toBeGreaterThan ( 0 ) ;
284+ const outputText = content [ 0 ] . text ;
288285
286+ // Check to ensure that the output string format remains the same.
287+ // If someone changes the output format, this test may stop working
288+ // without actually failing.
289+ expect ( outputText ) . toContain ( 'This Actor' ) ;
289290 // Check that no rental Actors are present
290- for ( const actor of actors ) {
291- // Since we now return the pricingInfo as a string, we need to check if it contains the string
292- expect ( actor . pricingInfo ) . not . toContain ( 'This Actor is rental' ) ;
293- }
291+ expect ( outputText ) . not . toContain ( 'This Actor is rental' ) ;
294292
295293 await client . close ( ) ;
296294 } ) ;
You can’t perform that action at this time.
0 commit comments