@@ -15,9 +15,41 @@ describe('VINFO', () => {
15
15
await client . vAdd ( 'key' , [ 1.0 , 2.0 , 3.0 ] , 'element' ) ;
16
16
17
17
const result = await client . vInfo ( 'key' ) ;
18
- assert . ok ( Array . isArray ( result ) ) ;
18
+ assert . ok ( typeof result === 'object' && result !== null ) ;
19
+
20
+ assert . equal ( result [ 'vector-dim' ] , 3 ) ;
21
+ assert . equal ( result [ 'size' ] , 1 ) ;
22
+ assert . ok ( 'quant-type' in result ) ;
23
+ assert . ok ( 'hnsw-m' in result ) ;
24
+ assert . ok ( 'projection-input-dim' in result ) ;
25
+ assert . ok ( 'max-level' in result ) ;
26
+ assert . ok ( 'attributes-count' in result ) ;
27
+ assert . ok ( 'vset-uid' in result ) ;
28
+ assert . ok ( 'hnsw-max-node-uid' in result ) ;
19
29
} , {
20
30
client : GLOBAL . SERVERS . OPEN ,
21
31
cluster : GLOBAL . CLUSTERS . OPEN
22
32
} ) ;
33
+
34
+ testUtils . testWithClient ( 'vInfo with RESP3' , async client => {
35
+ await client . vAdd ( 'resp3-key' , [ 1.0 , 2.0 , 3.0 ] , 'resp3-element' ) ;
36
+
37
+ const result = await client . vInfo ( 'resp3-key' ) ;
38
+ assert . ok ( typeof result === 'object' && result !== null ) ;
39
+
40
+ assert . equal ( result [ 'vector-dim' ] , 3 ) ;
41
+ assert . equal ( result [ 'size' ] , 1 ) ;
42
+ assert . ok ( 'quant-type' in result ) ;
43
+ assert . ok ( 'hnsw-m' in result ) ;
44
+ assert . ok ( 'projection-input-dim' in result ) ;
45
+ assert . ok ( 'max-level' in result ) ;
46
+ assert . ok ( 'attributes-count' in result ) ;
47
+ assert . ok ( 'vset-uid' in result ) ;
48
+ assert . ok ( 'hnsw-max-node-uid' in result ) ;
49
+ } , {
50
+ ...GLOBAL . SERVERS . OPEN ,
51
+ clientOptions : {
52
+ RESP : 3
53
+ }
54
+ } ) ;
23
55
} ) ;
0 commit comments