Skip to content

Commit eb63a41

Browse files
committed
test: update attribute type expectations
1 parent 71432a2 commit eb63a41

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

__test__/integration/graph/graph.test.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe('Test graph class', () => {
113113
expect(Array.from(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].apis)).toEqual(['API1']);
114114
expect(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].sources).toHaveProperty('source1');
115115
expect(Array.from(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].publications)).toEqual(['PMID:1', 'PMID:2']);
116-
expect(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].attributes).toHaveProperty('relation', new Set(['relation1']));
116+
expect(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].attributes).toHaveProperty('relation', ['relation1']);
117117
});
118118

119119
test('Multiple query results are correctly updated for two edges having same input, predicate and output', () => {
@@ -134,13 +134,13 @@ describe('Test graph class', () => {
134134
expect(Array.from(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].apis)).toEqual(['API1']);
135135
expect(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].sources).toHaveProperty('source1');
136136
expect(Array.from(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].publications)).toEqual(['PMID:1', 'PMID:2']);
137-
expect(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].attributes).toHaveProperty('relation', new Set(['relation1']));
137+
expect(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].attributes).toHaveProperty('relation', ['relation1']);
138138

139139
expect(g.edges).toHaveProperty('6930dcb2e9363817e9f6e736829ce278');
140140
expect(Array.from(g.edges['6930dcb2e9363817e9f6e736829ce278'].apis)).toEqual(['API2']);
141141
expect(g.edges['6930dcb2e9363817e9f6e736829ce278'].sources).toHaveProperty('source2');
142142
expect(Array.from(g.edges['6930dcb2e9363817e9f6e736829ce278'].publications)).toEqual(['PMC:1', 'PMC:2']);
143-
expect(g.edges['6930dcb2e9363817e9f6e736829ce278'].attributes).toHaveProperty('relation', new Set(['relation2']));
143+
expect(g.edges['6930dcb2e9363817e9f6e736829ce278'].attributes).toHaveProperty('relation', ['relation2']);
144144
});
145145

146146
test('Multiple query results for different edges are correctly updated', () => {
@@ -161,19 +161,19 @@ describe('Test graph class', () => {
161161
expect(Array.from(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].apis)).toEqual(['API1']);
162162
expect(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].sources).toHaveProperty('source1');
163163
expect(Array.from(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].publications)).toEqual(['PMID:1', 'PMID:2']);
164-
expect(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].attributes).toHaveProperty('relation', new Set(['relation1']));
164+
expect(g.edges['3eb29a4cead0e5f3c3bdca4997bf215b'].attributes).toHaveProperty('relation', ['relation1']);
165165

166166
expect(g.edges).toHaveProperty('6930dcb2e9363817e9f6e736829ce278');
167167
expect(Array.from(g.edges['6930dcb2e9363817e9f6e736829ce278'].apis)).toEqual(['API2']);
168168
expect(g.edges['6930dcb2e9363817e9f6e736829ce278'].sources).toHaveProperty('source2');
169169
expect(Array.from(g.edges['6930dcb2e9363817e9f6e736829ce278'].publications)).toEqual(['PMC:1', 'PMC:2']);
170-
expect(g.edges['6930dcb2e9363817e9f6e736829ce278'].attributes).toHaveProperty('relation', new Set(['relation2']));
170+
expect(g.edges['6930dcb2e9363817e9f6e736829ce278'].attributes).toHaveProperty('relation', ['relation2']);
171171

172172
expect(g.edges).toHaveProperty('38e8cf1917452c83bb878c5a916ef86a');
173173
expect(Array.from(g.edges['38e8cf1917452c83bb878c5a916ef86a'].apis)).toEqual(['API3']);
174174
expect(g.edges['38e8cf1917452c83bb878c5a916ef86a'].sources).toHaveProperty('source3');
175175
expect(Array.from(g.edges['38e8cf1917452c83bb878c5a916ef86a'].publications)).toEqual(['PMC:3', 'PMC:4']);
176-
expect(g.edges['38e8cf1917452c83bb878c5a916ef86a'].attributes).toHaveProperty('relation', new Set(['relation3']));
176+
expect(g.edges['38e8cf1917452c83bb878c5a916ef86a'].attributes).toHaveProperty('relation', ['relation3']);
177177
});
178178

179179
test('Multiple attributes with the same name are merged', () => {
@@ -187,9 +187,10 @@ describe('Test graph class', () => {
187187
'PMC:6',
188188
'PMC:7',
189189
]);
190-
expect(g.edges['38e8cf1917452c83bb878c5a916ef86a'].attributes).toHaveProperty(
191-
'relation',
192-
new Set(['relation3', 'relation3a', 'relation3b']),
193-
);
190+
expect(g.edges['38e8cf1917452c83bb878c5a916ef86a'].attributes).toHaveProperty('relation', [
191+
'relation3',
192+
'relation3a',
193+
'relation3b',
194+
]);
194195
});
195196
});

0 commit comments

Comments
 (0)