Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
add graphml test for node and edge type
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccamadsen committed Jun 17, 2019
1 parent 2ee730c commit 2d234f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/utils/formatters/graphml/__tests__/createGraphML-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ describe('buildGraphML', () => {
expect(xml.getElementsByTagName('node')).toHaveLength(2);
});

it('adds node type', () => {
const node = xml.getElementsByTagName('node')[0];
expect(node.getElementsByTagName('data')[0].textContent).toEqual('person');
});

it('adds edge type', () => {
const edge = xml.getElementsByTagName('edge')[0];
expect(edge.getElementsByTagName('data')[1].textContent).toEqual('mock-uuid-3');
});

it('adds edges', () => {
expect(xml.getElementsByTagName('edge')).toHaveLength(1);
});
Expand Down

0 comments on commit 2d234f0

Please sign in to comment.