@@ -266,11 +266,13 @@ describe('Client Metadata Update Prose Tests', function () {
266
266
267
267
// Since we have our own driver metadata getting added, we really want to just
268
268
// assert that the last driver info values are appended at the end.
269
- expect ( updatedClientMetadata . driver . name . endsWith ( 'framework' ) ) . to . be . true ;
270
- expect ( updatedClientMetadata . driver . version . endsWith ( version ? version : '1.2' ) ) . to . be
271
- . true ;
272
- expect ( updatedClientMetadata . platform . endsWith ( platform ? platform : 'Library Platform' ) )
273
- . to . be . true ;
269
+ expect ( updatedClientMetadata . driver . name ) . to . match ( / ^ .* \| f r a m e w o r k $ / ) ;
270
+ expect ( updatedClientMetadata . driver . version ) . to . match (
271
+ new RegExp ( `^.*\\|${ version ? version : '1.2' } $` )
272
+ ) ;
273
+ expect ( updatedClientMetadata . platform ) . to . match (
274
+ new RegExp ( `^.*\\|${ platform ? platform : 'Library Platform' } $` )
275
+ ) ;
274
276
// - All other subfields in the client document remain unchanged from initialClientMetadata.
275
277
// (Note os is the only one getting set in these tests)
276
278
expect ( updatedClientMetadata . os ) . to . deep . equal ( initialClientMetadata . os ) ;
@@ -336,11 +338,13 @@ describe('Client Metadata Update Prose Tests', function () {
336
338
337
339
// Since we have our own driver metadata getting added, we really want to just
338
340
// assert that the last driver info values are appended at the end.
339
- expect ( updatedClientMetadata . driver . name . endsWith ( 'framework' ) ) . to . be . true ;
340
- expect ( updatedClientMetadata . driver . version . endsWith ( version ? version : '1.2' ) ) . to . be
341
- . true ;
342
- expect ( updatedClientMetadata . platform . endsWith ( platform ? platform : 'Library Platform' ) )
343
- . to . be . true ;
341
+ expect ( updatedClientMetadata . driver . name ) . to . match ( / ^ .* \| f r a m e w o r k $ / ) ;
342
+ expect ( updatedClientMetadata . driver . version ) . to . match (
343
+ new RegExp ( `^.*\\|${ version ? version : '1.2' } $` )
344
+ ) ;
345
+ expect ( updatedClientMetadata . platform ) . to . match (
346
+ new RegExp ( `^.*\\|${ platform ? platform : 'Library Platform' } $` )
347
+ ) ;
344
348
// - All other subfields in the client document remain unchanged from initialClientMetadata.
345
349
// (Note os is the only one getting set in these tests)
346
350
expect ( updatedClientMetadata . os ) . to . deep . equal ( initialClientMetadata . os ) ;
0 commit comments