From 2d234f0d070988620e735cb11ff3218d5f173945 Mon Sep 17 00:00:00 2001 From: Rebecca Madsen Date: Mon, 17 Jun 2019 12:42:22 -0400 Subject: [PATCH] add graphml test for node and edge type --- .../formatters/graphml/__tests__/createGraphML-test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/utils/formatters/graphml/__tests__/createGraphML-test.js b/src/main/utils/formatters/graphml/__tests__/createGraphML-test.js index 65237ae54..005425d79 100644 --- a/src/main/utils/formatters/graphml/__tests__/createGraphML-test.js +++ b/src/main/utils/formatters/graphml/__tests__/createGraphML-test.js @@ -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); });