Skip to content

Commit

Permalink
chore: re-introduce deeply-nested test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr committed Sep 27, 2024
1 parent d41a068 commit e93e562
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/N3Store-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1999,6 +1999,33 @@ describe('Store', () => {
},
);

it(
'should include added elements in match if iteration has not yet started (deeply nested)',
() => {
const m = store.match(null, null, null, null);
store.add(new Quad(
new NamedNode('s1'),
new NamedNode('p1'),
new Quad(new NamedNode('s1'), new NamedNode('p1'), new NamedNode('o3')),
),
);
store.add(new Quad(
new NamedNode('s1'),
new NamedNode('p1'),
new Quad(
new NamedNode('s1'),
new NamedNode('p1'),
new Quad(
new NamedNode('s1'),
new NamedNode('p1'),
new NamedNode('o3'),
),
),
));
expect([...m]).toHaveLength(4);
expect([...store.match(null, null, null, null)]).toHaveLength(4);
});

it(
'perform matches on an range of defined and undefined elements',
() => {
Expand Down

0 comments on commit e93e562

Please sign in to comment.