File tree Expand file tree Collapse file tree 3 files changed +6
-15
lines changed
Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Original file line number Diff line number Diff line change 22
33### Fixed
44- Use rdf-canonize to compare n-quads test results.
5+ - Multiple graph tests.
56
67### Changed
78- Use JSON-LD WG tests.
Original file line number Diff line number Diff line change @@ -660,11 +660,10 @@ function _expandObject({
660660 // and value is not, itself, a graph
661661 // index cases handled above
662662 if ( container . includes ( '@graph' ) &&
663- ! container . some ( key => key === '@id' || key === '@index' ) &&
664- ! _isGraph ( expandedValue ) ) {
665- // ensure expanded value is an array
666- expandedValue = [ ] . concat ( expandedValue ) ;
667- expandedValue = { '@graph' : expandedValue } ;
663+ ! container . some ( key => key === '@id' || key === '@index' ) ) {
664+ // ensure expanded values are arrays
665+ expandedValue = [ ] . concat ( expandedValue )
666+ . map ( v => _isGraph ( v ) ? v : { '@graph' : [ ] . concat ( v ) } ) ;
668667 }
669668
670669 // FIXME: can this be merged with code above to simplify?
Original file line number Diff line number Diff line change @@ -47,10 +47,7 @@ const TEST_TYPES = {
4747 // scoped context on type
4848 / ^ # t c 0 1 2 / ,
4949 // rel iri
50- / ^ # t 0 0 9 5 / ,
51- // graphs
52- / ^ # t 0 0 9 2 / ,
53- / ^ # t 0 0 9 3 /
50+ / ^ # t 0 0 9 5 /
5451 ]
5552 } ,
5653 fn : 'compact' ,
@@ -81,12 +78,6 @@ const TEST_TYPES = {
8178 / ^ # t p 0 0 2 / ,
8279 // scoped context on type
8380 / ^ # t c 0 1 1 / ,
84- // graph
85- / ^ # t 0 0 9 3 / ,
86- / ^ # t 0 0 9 4 / ,
87- / ^ # t 0 0 9 5 / ,
88- / ^ # t 0 1 0 3 / ,
89- / ^ # t 0 1 0 4 / ,
9081 // rel iri
9182 / ^ # t 0 0 9 2 / ,
9283 // remote
You can’t perform that action at this time.
0 commit comments