File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,19 @@ describe.each([
2020 await client . waitForTask ( taskUid ) ;
2121 } ) ;
2222
23+ test ( `${ permission } key: Get all batches` , async ( ) => {
24+ const client = await getClient ( permission ) ;
25+ const batches = await client . getBatches ( ) ;
26+ expect ( batches . results . length ) . toBeGreaterThan ( 0 ) ;
27+ } ) ;
28+
2329 test ( `${ permission } key: Get one batch` , async ( ) => {
2430 const client = await getClient ( permission ) ;
25- const batch = await client . getBatch ( 1 ) ;
26- expect ( batch . uid ) . toEqual ( 1 ) ;
27- expect ( batch . details ) . toHaveProperty ( "receivedDocuments" ) ;
28- expect ( batch . details ) . toHaveProperty ( "indexedDocuments" ) ;
31+
32+ const batches = await client . getBatches ( ) ;
33+ const batch = await client . getBatch ( batches . results [ 0 ] . uid ) ;
34+ expect ( batch . uid ) . toEqual ( batches . results [ 0 ] . uid ) ;
35+ expect ( batch . details ) . toBeDefined ( ) ;
2936 expect ( batch . stats ) . toHaveProperty ( "totalNbTasks" ) ;
3037 expect ( batch . stats ) . toHaveProperty ( "status" ) ;
3138 expect ( batch . stats ) . toHaveProperty ( "types" ) ;
You can’t perform that action at this time.
0 commit comments