File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function fromKey (key) {
1313function fromNodes ( nodes ) {
1414 return {
1515 prefix : fromKey ( nodes [ 0 ] . key ) ,
16- uri : nodes [ 0 ] . value
16+ uri : nodes [ 0 ] . value . toString ( )
1717 }
1818}
1919
Original file line number Diff line number Diff line change @@ -17,13 +17,13 @@ describe('prefix utilities', () => {
1717
1818 describe ( 'fromNodes' , ( ) => {
1919 it ( 'converts hyperdb nodes to prefix/uri object' , ( ) => {
20- const dummyNodes = [ { key : '@prefix/this' , value : 'http://this.example.com' } ]
20+ const dummyNodes = [ { key : '@prefix/this' , value : Buffer . from ( 'http://this.example.com' ) } ]
2121 expect ( prefixes . fromNodes ( dummyNodes ) ) . to . eql ( { uri : 'http://this.example.com' , prefix : 'this' } )
2222 } )
2323 it ( 'ignores conflicts' , ( ) => {
2424 const dummyNodes = [
25- { key : '@prefix/this' , value : 'http://this.example.com' } ,
26- { key : '@prefix/this' , value : 'http://conflict.example.com' }
25+ { key : '@prefix/this' , value : Buffer . from ( 'http://this.example.com' ) } ,
26+ { key : '@prefix/this' , value : Buffer . from ( 'http://conflict.example.com' ) }
2727 ]
2828 expect ( prefixes . fromNodes ( dummyNodes ) ) . to . eql ( { uri : 'http://this.example.com' , prefix : 'this' } )
2929 } )
You can’t perform that action at this time.
0 commit comments