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 2
2
3
3
### Fixed
4
4
- Use rdf-canonize to compare n-quads test results.
5
+ - Multiple graph tests.
5
6
6
7
### Changed
7
8
- Use JSON-LD WG tests.
Original file line number Diff line number Diff line change @@ -660,11 +660,10 @@ function _expandObject({
660
660
// and value is not, itself, a graph
661
661
// index cases handled above
662
662
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 ) } ) ;
668
667
}
669
668
670
669
// 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 = {
47
47
// scoped context on type
48
48
/ ^ # t c 0 1 2 / ,
49
49
// 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 /
54
51
]
55
52
} ,
56
53
fn : 'compact' ,
@@ -81,12 +78,6 @@ const TEST_TYPES = {
81
78
/ ^ # t p 0 0 2 / ,
82
79
// scoped context on type
83
80
/ ^ # 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 / ,
90
81
// rel iri
91
82
/ ^ # t 0 0 9 2 / ,
92
83
// remote
You can’t perform that action at this time.
0 commit comments