@@ -93,7 +93,7 @@ describe('Turtle Module', () => {
9393 value : '42' ,
9494 datatype : 'http://www.w3.org/2001/XMLSchema#integer'
9595 } ;
96- expect ( serializeValue ( literal ) ) . toBe ( '"42"^^<http://www.w3.org/2001/XMLSchema#integer> ' ) ;
96+ expect ( serializeValue ( literal ) ) . toBe ( '"42"^^xsd:int ' ) ;
9797 } ) ;
9898
9999 test ( 'should serialize literal with language tag correctly' , ( ) => {
@@ -147,7 +147,7 @@ describe('Turtle Module', () => {
147147 const result = serializeDocument ( doc ) ;
148148 expect ( result ) . toContain ( '@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .' ) ;
149149 expect ( result ) . toContain ( '@prefix ex: <http://example.org/> .' ) ;
150- expect ( result ) . toContain ( '<http://example.org/subject> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Person> .' ) ;
150+ expect ( result ) . toContain ( '<http://example.org/subject> a <http://example.org/Person> .' ) ;
151151 } ) ;
152152 } ) ;
153153
@@ -232,7 +232,7 @@ describe('Turtle Module', () => {
232232 addLabel ( doc , 'http://example.org/subject' , 'Hello World' ) ;
233233
234234 expect ( doc . triples ) . toHaveLength ( 1 ) ;
235- expect ( doc . triples [ 0 ] . predicate ) . toBe ( 'http://www.w3.org/2000/01/rdf-schema# label' ) ;
235+ expect ( doc . triples [ 0 ] . predicate ) . toBe ( 'rdfs: label' ) ;
236236 expect ( doc . triples [ 0 ] . object ) . toEqual ( { value : 'Hello World' } ) ;
237237 } ) ;
238238
@@ -329,9 +329,10 @@ describe('Turtle Module', () => {
329329 expect ( result ) . toContain ( '@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .' ) ;
330330 expect ( result ) . toContain ( '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .' ) ;
331331 expect ( result ) . toContain ( '@prefix ex: <http://example.org/> .' ) ;
332- expect ( result ) . toContain ( '<http://example.org/Person> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .' ) ;
333- expect ( result ) . toContain ( '<http://example.org/john> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Person> .' ) ;
334- expect ( result ) . toContain ( '<http://example.org/john> <http://www.w3.org/2000/01/rdf-schema#label> "John Doe" .' ) ;
332+ expect ( result ) . toContain ( '<http://example.org/Person> a <http://www.w3.org/2000/01/rdf-schema#Class> .' ) ;
333+ expect ( result ) . toContain ( '<http://example.org/john> a <http://example.org/Person>' ) ;
334+ expect ( result ) . toContain ( '<http://example.org/john>' ) ;
335+ expect ( result ) . toContain ( '<http://www.w3.org/2000/01/rdf-schema#label> "John Doe"' ) ;
335336 } ) ;
336337
337338 test ( 'should create document using helper functions' , ( ) => {
@@ -351,11 +352,12 @@ describe('Turtle Module', () => {
351352
352353 const result = serializeDocument ( doc ) ;
353354
354- expect ( result ) . toContain ( '<http://example.org/Person> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .' ) ;
355- expect ( result ) . toContain ( '<http://example.org/john> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Person> .' ) ;
356- expect ( result ) . toContain ( '<http://example.org/john> <http://www.w3.org/2000/01/rdf-schema#label> "John Doe" .' ) ;
357- expect ( result ) . toContain ( '<http://example.org/john> <http://example.org/email> "john@example.org" .' ) ;
358- expect ( result ) . toContain ( '<http://example.org/john> <http://example.org/age> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .' ) ;
355+ expect ( result ) . toContain ( '<http://example.org/Person> a <http://www.w3.org/2000/01/rdf-schema#Class> .' ) ;
356+ expect ( result ) . toContain ( '<http://example.org/john> a <http://example.org/Person>' ) ;
357+ expect ( result ) . toContain ( '<http://example.org/john>' ) ;
358+ expect ( result ) . toContain ( 'rdfs:label "John Doe"' ) ;
359+ expect ( result ) . toContain ( '<http://example.org/email> "john@example.org"' ) ;
360+ expect ( result ) . toContain ( '<http://example.org/age> "30"^^xsd:int' ) ;
359361 } ) ;
360362 } ) ;
361363} ) ;
0 commit comments