From 15be95b14e63c29fd2456291fa341cb9814de3dc Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 27 Nov 2023 10:47:53 -0800 Subject: [PATCH] fix: Fix tests for OmniGraphBuilder --- packages/ua-utils/test/omnigraph/builder.test.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/ua-utils/test/omnigraph/builder.test.ts b/packages/ua-utils/test/omnigraph/builder.test.ts index ab55dee92..d49d8a8ec 100644 --- a/packages/ua-utils/test/omnigraph/builder.test.ts +++ b/packages/ua-utils/test/omnigraph/builder.test.ts @@ -166,7 +166,12 @@ describe('omnigraph/builder', () => { fc.property(edgeArbitrary, nodeConfigArbitrary, (edge, nodeConfig) => { const builder = new OmniGraphBuilder() - builder.addNodes({ point: edge.vector.to, config: nodeConfig }) + builder + .addNodes( + { point: edge.vector.from, config: nodeConfig }, + { point: edge.vector.to, config: nodeConfig } + ) + .removeNodeAt(edge.vector.from) expect(() => builder.addEdges(edge)).toThrow() }) @@ -178,7 +183,12 @@ describe('omnigraph/builder', () => { fc.property(edgeArbitrary, nodeConfigArbitrary, (edge, nodeConfig) => { const builder = new OmniGraphBuilder() - builder.addNodes({ point: edge.vector.from, config: nodeConfig }) + builder + .addNodes( + { point: edge.vector.from, config: nodeConfig }, + { point: edge.vector.to, config: nodeConfig } + ) + .removeNodeAt(edge.vector.to) expect(() => builder.addEdges(edge)).toThrow() })