Skip to content

Commit

Permalink
update tests to expect all edges
Browse files Browse the repository at this point in the history
should not expect filtered edges for node filtering
  • Loading branch information
buckhalt committed Dec 2, 2024
1 parent 186fffc commit a499285
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/network-query/__tests__/filter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ describe('filter', () => {
(node) => node[entityAttributesProperty].name,
);
expect(names).toEqual(['William', 'Theodore', 'Rufus']);
expect(result.edges.length).toEqual(3);
expect(result.edges.length).toEqual(4);
});

it.todo('can filter edges by type (not)');
Expand All @@ -282,7 +282,7 @@ describe('filter', () => {
const filter = getFilter(filterConfig);

const result = filter(network);
expect(result.edges.length).toEqual(2);
expect(result.edges.length).toEqual(4);
});
});
});
Expand Down
16 changes: 8 additions & 8 deletions lib/network-query/__tests__/rules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ describe('rules', () => {
const { nodeNames, edges } = runRuleHelper(ruleConfig);

expect(nodeNames).toEqual(['William', 'Theodore', 'Rufus']);
expect(edges.length).toEqual(2);
expect(edges.length).toEqual(4);
});

it('NOT_EXISTS', () => {
Expand All @@ -248,7 +248,7 @@ describe('rules', () => {
'Phone Box',
'Pillar Box',
]);
expect(edges.length).toEqual(2);
expect(edges.length).toEqual(4);
});

describe('attribute rules', () => {
Expand All @@ -268,7 +268,7 @@ describe('rules', () => {
const { nodeNames, edges } = runRuleHelper(ruleConfig);

expect(nodeNames).toEqual(['William', 'Theodore']);
expect(edges.length).toEqual(1);
expect(edges.length).toEqual(4);
});

it('NOT', () => {
Expand All @@ -281,7 +281,7 @@ describe('rules', () => {
const { nodeNames, edges } = runRuleHelper(ruleConfig);

expect(nodeNames).toEqual(['Theodore', 'Rufus']);
expect(edges.length).toEqual(1);
expect(edges.length).toEqual(4);
});

it('GREATER_THAN', () => {
Expand All @@ -294,7 +294,7 @@ describe('rules', () => {
const { nodeNames, edges } = runRuleHelper(ruleConfig);

expect(nodeNames).toEqual(['William', 'Theodore']);
expect(edges.length).toEqual(1);
expect(edges.length).toEqual(4);
});

it('LESS_THAN', () => {
Expand All @@ -307,7 +307,7 @@ describe('rules', () => {
const { nodeNames, edges } = runRuleHelper(ruleConfig);

expect(nodeNames).toEqual(['Theodore', 'Rufus']);
expect(edges.length).toEqual(1);
expect(edges.length).toEqual(4);
});

it('GREATER_THAN_OR_EQUAL', () => {
Expand All @@ -320,7 +320,7 @@ describe('rules', () => {
const { nodeNames, edges } = runRuleHelper(ruleConfig);

expect(nodeNames).toEqual(['William', 'Theodore']);
expect(edges.length).toEqual(1);
expect(edges.length).toEqual(4);
});

it('LESS_THAN_OR_EQUAL', () => {
Expand All @@ -333,7 +333,7 @@ describe('rules', () => {
const { nodeNames, edges } = runRuleHelper(ruleConfig);

expect(nodeNames).toEqual(['Theodore', 'Rufus']);
expect(edges.length).toEqual(1);
expect(edges.length).toEqual(4);
});
});
});
Expand Down

0 comments on commit a499285

Please sign in to comment.