Skip to content

Commit

Permalink
Add unit test for graphs with non-equal blank node count
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Aug 30, 2018
1 parent aa9b087 commit f77a1b2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/RdfIsomorphic-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,24 @@ describe('isomorphic', () => {
];
return expect(isomorphic(graphA, graphB)).toBe(true);
});

it('should not be isomorphic for 2 graphs with single full-blank triples', () => {
const graphA = [
DataFactory.quad(
DataFactory.blankNode('a1'),
DataFactory.blankNode('b1'),
DataFactory.blankNode('a1'),
),
];
const graphB = [
DataFactory.quad(
DataFactory.blankNode('a2'),
DataFactory.blankNode('b2'),
DataFactory.blankNode('c2'),
),
];
return expect(isomorphic(graphA, graphB)).toBe(false);
});
});
});

Expand Down

0 comments on commit f77a1b2

Please sign in to comment.