File tree Expand file tree Collapse file tree 5 files changed +50
-0
lines changed 
clients/algoliasearch-client-dart/packages/client_abtesting_v3 Expand file tree Collapse file tree 5 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ targets :
2+   $default :
3+     builders :
4+       json_serializable :
5+         options :
6+           any_map : false 
7+           checked : true 
8+           create_factory : true 
9+           create_to_json : true 
10+           disallow_unrecognized_keys : false 
11+           explicit_to_json : true 
12+           field_rename : none 
13+           ignore_unannotated : false 
14+           include_if_null : false 
Original file line number Diff line number Diff line change 1+ import  'package:algolia_client_abtesting_v3/algolia_client_abtesting_v3.dart' ;
2+ 
3+ void  main () async  {
4+   // Creating an instance of the Abtesting V3 client with the provided App ID and API key. 
5+   final  abtesting =  AbtestingV3Client (
6+     appId:  'latency' ,
7+     apiKey:  '6be0576ff61c053d5f9a3225e2a90f76' ,
8+     region:  'us' ,
9+   );
10+ 
11+   await  abtesting.getABTest (
12+     id:  123 ,
13+   );
14+ 
15+   // Close the client and dispose of all underlying resources. 
16+   abtesting.dispose ();
17+ }
Original file line number Diff line number Diff line change 1+ import  'dart:io' ;
2+ 
3+ import  'package:algolia_client_abtesting_v3/src/version.dart' ;
4+ import  'package:test/test.dart' ;
5+ 
6+ void  main () {
7+   if  (Directory .current.path.endsWith ('/test' )) {
8+     Directory .current =  Directory .current.parent;
9+   }
10+   test ('package version matches pubspec' , () {
11+     final  pubspecPath =  '${Directory .current .path }/pubspec.yaml' ;
12+     final  pubspec =  File (pubspecPath).readAsStringSync ();
13+     final  regex =  RegExp ('version:s*(.*)' );
14+     final  match =  regex.firstMatch (pubspec);
15+     expect (match, isNotNull);
16+     expect (packageVersion, match? .group (1 )? .trim ());
17+   });
18+ }
Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ dependencies:
1717  algolia_client_core : any 
1818dev_dependencies :
1919  lints : ^6.0.0 
20+   algolia_client_abtesting_v3 : any 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments