File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,6 @@ coverage
1414dist
1515node_modules
1616npm-debug.log
17+ package-lock.json
1718tests /webidl /* -new
1819v8.log
Original file line number Diff line number Diff line change @@ -109,6 +109,8 @@ api.prependBase = (base, iri) => {
109109 path = path . substr ( 0 , path . lastIndexOf ( '/' ) + 1 ) ;
110110 if ( ( path . length > 0 || base . authority ) && path . substr ( - 1 ) !== '/' ) {
111111 path += '/' ;
112+ } else if ( rel . protocol ) {
113+ path += rel . protocol ;
112114 }
113115 path += rel . path ;
114116
Original file line number Diff line number Diff line change @@ -1491,6 +1491,7 @@ _:b0 <ex:p> "v" .
14911491 testSafe : true
14921492 } ) ;
14931493 } ) ;
1494+
14941495 } ) ;
14951496
14961497 describe ( 'values' , ( ) => {
@@ -2816,6 +2817,37 @@ _:b0 <ex:p> "[null]"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON> .
28162817 } ) ;
28172818 } ) ;
28182819
2820+ it ( 'should be called on relative IRI for id term [4]' , async ( ) => {
2821+ const input =
2822+ {
2823+ "@id" : "34:relativeiri" ,
2824+ "urn:test" : "value"
2825+ }
2826+ ;
2827+ const expected =
2828+ [
2829+ {
2830+ "@id" : "34:relativeiri" ,
2831+ "urn:test" : [
2832+ {
2833+ "@value" : "value"
2834+ }
2835+ ]
2836+ }
2837+ ]
2838+ ;
2839+
2840+ await _test ( {
2841+ type : 'expand' ,
2842+ input,
2843+ expected,
2844+ eventCodeLog : [
2845+ 'relative @id reference'
2846+ ] ,
2847+ testNotSafe : true
2848+ } ) ;
2849+ } ) ;
2850+
28192851 it ( 'should be called on relative IRI for id term (nested)' , async ( ) => {
28202852 const input =
28212853{
You can’t perform that action at this time.
0 commit comments