Skip to content

Commit 2f3c49e

Browse files
committed
update one more test
1 parent 41938e8 commit 2f3c49e

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/utilities/convert-nodes.test.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
convertToInternalNodes,
88
} from '@/utilities/convert-nodes';
99
import { EMPLOYEES_NODE, ORDERS_NODE } from '@/mocks/datasets/nodes';
10+
import { DEFAULT_FIELD_HEIGHT, DEFAULT_NODE_WIDTH } from '@/utilities/constants';
1011

1112
describe('convert-nodes', () => {
1213
describe('convertToExternalNode', () => {
@@ -144,7 +145,17 @@ describe('convert-nodes', () => {
144145

145146
describe('convertToInternalNodes', () => {
146147
it('Should convert node props to internal node', () => {
147-
const internalNodes = convertToInternalNodes([{ ...ORDERS_NODE, disabled: true }, EMPLOYEES_NODE]);
148+
const internalNodes = convertToInternalNodes([
149+
{
150+
...ORDERS_NODE,
151+
measured: {
152+
width: DEFAULT_NODE_WIDTH,
153+
height: DEFAULT_FIELD_HEIGHT * 2,
154+
},
155+
disabled: true,
156+
},
157+
EMPLOYEES_NODE,
158+
]);
148159
expect(internalNodes).toEqual([
149160
{
150161
id: 'orders',
@@ -174,10 +185,6 @@ describe('convert-nodes', () => {
174185
x: 300,
175186
y: 300,
176187
},
177-
measured: {
178-
height: 72,
179-
width: 244,
180-
},
181188
connectable: false,
182189
data: {
183190
fields: [

0 commit comments

Comments
 (0)