@@ -30,33 +30,33 @@ describe('Create a database, schema and insert data', () => {
3030 } )
3131
3232 test ( 'Insert Document Child Tom' , async ( ) => {
33- const person = { "age" :10 , "name" :"Tom" , "@type" :"Child" }
33+ const person = { "age" :"10" , "name" :"Tom" , "@type" :"Child" }
3434 const result = await client . addDocument ( person ) ;
3535 expect ( result ) . toStrictEqual ( [ "terminusdb:///data/Child/Tom" ] ) ;
3636 } )
3737
3838 test ( 'Insert Document Child Anna' , async ( ) => {
39- const person = { "age" :20 , "name" :"Anna" , "@type" :"Child" }
39+ const person = { "age" :"20" , "name" :"Anna" , "@type" :"Child" }
4040 const result = await client . addDocument ( person ) ;
4141 expect ( result ) . toStrictEqual ( [ "terminusdb:///data/Child/Anna" ] ) ;
4242 } )
4343
4444 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" }
4646 const result = await client . addDocument ( person ) ;
4747 expect ( result ) . toStrictEqual ( [ "terminusdb:///data/Parent/Tom%20Senior" ] ) ;
4848 } )
4949
5050 test ( 'Query Person by name' , async ( ) => {
5151 const queryTemplate = { "name" :"Tom" , "@type" :"Person" }
5252 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' } ) ;
5454 } )
5555
5656 test ( 'Query Person by ege' , async ( ) => {
57- const queryTemplate = { "age" :40 , "@type" :"Person" }
57+ const queryTemplate = { "age" :"40" , "@type" :"Person" }
5858 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" } ) ;
6060 } )
6161
6262 const change_request = "change_request02" ;
@@ -72,7 +72,7 @@ describe('Create a database, schema and insert data', () => {
7272 } )
7373
7474 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" }
7676 const result = await client . updateDocument ( childTom ) ;
7777 expect ( result ) . toStrictEqual ( [ "terminusdb:///data/Child/Tom" ] ) ;
7878 } )
@@ -108,7 +108,7 @@ describe('Create a database, schema and insert data', () => {
108108 expect ( result ) . toStrictEqual ( {
109109 '@id' : 'Child/Tom' ,
110110 '@type' : 'Child' ,
111- age : 10 ,
111+ age : "10" ,
112112 name : 'Tom' ,
113113 has_parent : 'Parent/Tom%20Senior'
114114 } ) ;
0 commit comments