@@ -30,33 +30,33 @@ describe('Create a database, schema and insert data', () => {
30
30
} )
31
31
32
32
test ( 'Insert Document Child Tom' , async ( ) => {
33
- const person = { "age" :10 , "name" :"Tom" , "@type" :"Child" }
33
+ const person = { "age" :"10" , "name" :"Tom" , "@type" :"Child" }
34
34
const result = await client . addDocument ( person ) ;
35
35
expect ( result ) . toStrictEqual ( [ "terminusdb:///data/Child/Tom" ] ) ;
36
36
} )
37
37
38
38
test ( 'Insert Document Child Anna' , async ( ) => {
39
- const person = { "age" :20 , "name" :"Anna" , "@type" :"Child" }
39
+ const person = { "age" :"20" , "name" :"Anna" , "@type" :"Child" }
40
40
const result = await client . addDocument ( person ) ;
41
41
expect ( result ) . toStrictEqual ( [ "terminusdb:///data/Child/Anna" ] ) ;
42
42
} )
43
43
44
44
test ( 'Insert Document Parent Tom Senior' , async ( ) => {
45
- const person = { "age" :40 , "name" :"Tom Senior" , "@type" :"Parent" , "has_child" :"Child/Tom" }
45
+ const person = { "age" :"40" , "name" :"Tom Senior" , "@type" :"Parent" , "has_child" :"Child/Tom" }
46
46
const result = await client . addDocument ( person ) ;
47
47
expect ( result ) . toStrictEqual ( [ "terminusdb:///data/Parent/Tom%20Senior" ] ) ;
48
48
} )
49
49
50
50
test ( 'Query Person by name' , async ( ) => {
51
51
const queryTemplate = { "name" :"Tom" , "@type" :"Person" }
52
52
const result = await client . getDocument ( { query :queryTemplate } ) ;
53
- expect ( result ) . toStrictEqual ( { '@id' : 'Child/Tom' , '@type' : 'Child' , age : 10 , name : 'Tom' } ) ;
53
+ expect ( result ) . toStrictEqual ( { '@id' : 'Child/Tom' , '@type' : 'Child' , age : "10" , name : 'Tom' } ) ;
54
54
} )
55
55
56
56
test ( 'Query Person by ege' , async ( ) => {
57
- const queryTemplate = { "age" :40 , "@type" :"Person" }
57
+ const queryTemplate = { "age" :"40" , "@type" :"Person" }
58
58
const result = await client . getDocument ( { query :queryTemplate } ) ;
59
- expect ( result ) . toStrictEqual ( { "@id" : "Parent/Tom%20Senior" , "age" :40 , "name" :"Tom Senior" , "@type" :"Parent" , "has_child" :"Child/Tom" } ) ;
59
+ expect ( result ) . toStrictEqual ( { "@id" : "Parent/Tom%20Senior" , "age" :"40" , "name" :"Tom Senior" , "@type" :"Parent" , "has_child" :"Child/Tom" } ) ;
60
60
} )
61
61
62
62
const change_request = "change_request02" ;
@@ -72,7 +72,7 @@ describe('Create a database, schema and insert data', () => {
72
72
} )
73
73
74
74
test ( 'Update Child Tom, link Parent' , async ( ) => {
75
- const childTom = { '@id' : 'Child/Tom' , '@type' : 'Child' , age : 10 , name : 'Tom' , has_parent :"Parent/Tom%20Senior" }
75
+ const childTom = { '@id' : 'Child/Tom' , '@type' : 'Child' , age : "10" , name : 'Tom' , has_parent :"Parent/Tom%20Senior" }
76
76
const result = await client . updateDocument ( childTom ) ;
77
77
expect ( result ) . toStrictEqual ( [ "terminusdb:///data/Child/Tom" ] ) ;
78
78
} )
@@ -108,7 +108,7 @@ describe('Create a database, schema and insert data', () => {
108
108
expect ( result ) . toStrictEqual ( {
109
109
'@id' : 'Child/Tom' ,
110
110
'@type' : 'Child' ,
111
- age : 10 ,
111
+ age : "10" ,
112
112
name : 'Tom' ,
113
113
has_parent : 'Parent/Tom%20Senior'
114
114
} ) ;
0 commit comments