@@ -20,7 +20,14 @@ describe('VGETATTR', () => {
20
20
await client . vSetAttr ( 'key' , 'element' , { name : 'test' } ) ;
21
21
22
22
const result = await client . vGetAttr ( 'key' , 'element' ) ;
23
+
23
24
assert . ok ( result !== null ) ;
25
+ assert . equal ( typeof result , 'object' )
26
+
27
+ assert . deepEqual ( result , {
28
+ name : 'test'
29
+ } )
30
+
24
31
25
32
} , {
26
33
client : GLOBAL . SERVERS . OPEN ,
@@ -48,13 +55,16 @@ describe('VGETATTR', () => {
48
55
const result = await client . vGetAttr ( 'resp3-key' , 'resp3-element' ) ;
49
56
50
57
assert . ok ( result !== null ) ;
58
+ assert . equal ( typeof result , 'object' )
59
+
60
+ assert . deepEqual ( result , {
61
+ name : 'test-item' ,
62
+ category : 'electronics' ,
63
+ price : 99.99 ,
64
+ inStock : true ,
65
+ tags : [ 'new' , 'featured' ]
66
+ } )
51
67
52
- // Parse the JSON result and verify structure
53
- const parsedAttrs = JSON . parse ( result . toString ( ) ) ;
54
- assert . equal ( parsedAttrs . name , 'test-item' ) ;
55
- assert . equal ( parsedAttrs . price , 99.99 ) ;
56
- assert . equal ( parsedAttrs . inStock , true ) ;
57
- assert . ok ( Array . isArray ( parsedAttrs . tags ) ) ;
58
68
} , {
59
69
...GLOBAL . SERVERS . OPEN ,
60
70
clientOptions : {
0 commit comments