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
14
14
dist
15
15
node_modules
16
16
npm-debug.log
17
+ package-lock.json
17
18
tests /webidl /* -new
18
19
v8.log
Original file line number Diff line number Diff line change @@ -109,6 +109,8 @@ api.prependBase = (base, iri) => {
109
109
path = path . substr ( 0 , path . lastIndexOf ( '/' ) + 1 ) ;
110
110
if ( ( path . length > 0 || base . authority ) && path . substr ( - 1 ) !== '/' ) {
111
111
path += '/' ;
112
+ } else if ( rel . protocol ) {
113
+ path += rel . protocol ;
112
114
}
113
115
path += rel . path ;
114
116
Original file line number Diff line number Diff line change @@ -1491,6 +1491,7 @@ _:b0 <ex:p> "v" .
1491
1491
testSafe : true
1492
1492
} ) ;
1493
1493
} ) ;
1494
+
1494
1495
} ) ;
1495
1496
1496
1497
describe ( 'values' , ( ) => {
@@ -2816,6 +2817,37 @@ _:b0 <ex:p> "[null]"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON> .
2816
2817
} ) ;
2817
2818
} ) ;
2818
2819
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
+
2819
2851
it ( 'should be called on relative IRI for id term (nested)' , async ( ) => {
2820
2852
const input =
2821
2853
{
You can’t perform that action at this time.
0 commit comments