chore(tests): useNodes/useEdges

This commit is contained in:
moklick
2024-01-10 13:41:18 +01:00
parent a0af30be3e
commit a35428d8a0
2 changed files with 4 additions and 4 deletions
@@ -13,7 +13,6 @@ describe('useEdges.cy.tsx', () => {
</ReactFlow> </ReactFlow>
); );
cy.get('@onChangeSpy').should('have.been.calledWith', []);
cy.get('@onChangeSpy').should('have.been.calledWith', initialEdges); cy.get('@onChangeSpy').should('have.been.calledWith', initialEdges);
}); });
@@ -15,8 +15,10 @@ const initialNodes: Node[] = nodes.map((n) => ({
const expectedNodes: Node[] = initialNodes.map((n) => ({ const expectedNodes: Node[] = initialNodes.map((n) => ({
...n, ...n,
positionAbsolute: n.position, computed: {
...nodeDimensions, positionAbsolute: n.position,
...nodeDimensions,
},
})); }));
describe('useNodes.cy.tsx', () => { describe('useNodes.cy.tsx', () => {
@@ -29,7 +31,6 @@ describe('useNodes.cy.tsx', () => {
</ReactFlow> </ReactFlow>
); );
cy.get('@onChangeSpy').should('have.been.calledWith', []);
cy.get('@onChangeSpy').should('have.been.calledWith', expectedNodes); cy.get('@onChangeSpy').should('have.been.calledWith', expectedNodes);
}); });