fix(test): correct test for testing custom node/edge types

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 6dcf5d8434
commit 97f4c0e847
+15 -2
View File
@@ -35,14 +35,27 @@ describe('test store state', () => {
it('gets custom node types', () => {
store.setState({
nodeTypes: ['custom'],
nodes: [
{
id: '1',
position: { x: 0, y: 0 },
type: 'custom',
},
],
})
expect(Object.keys(store.getNodeTypes)).to.contain('custom')
})
it('gets custom edge types', () => {
store.setState({
edgeTypes: ['custom'],
edges: [
{
id: '1',
source: '1',
target: '2',
type: 'custom',
},
],
})
expect(Object.keys(store.getEdgeTypes)).to.contain('custom')
})