fix(tests): correct tests

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 60fcbc2d06
commit d2961dec9f
2 changed files with 8 additions and 6 deletions
@@ -19,7 +19,8 @@ describe('test store action setElements', () => {
it('sets elements', async () => {
const store = useStore()
await setElements(store)
expect(store.elements).to.have.length(3)
expect(store.nodes).to.have.length(2)
expect(store.edges).to.have.length(1)
})
context('elements pre-set', () => {
@@ -45,11 +46,12 @@ describe('test store action setElements', () => {
})
it('has correct element ids', () => {
store.elements.forEach((el) => expect(['1', '2', 'e1-2']).to.include(el.id))
store.nodes.forEach((el) => expect(['1', '2']).to.include(el.id))
store.edges.forEach((el) => expect(['e1-2']).to.include(el.id))
})
it('has correct element types', () => {
store.elements.forEach((el) => expect(['input', 'default']).to.include(el.type))
store.nodes.forEach((el) => expect(['input', 'default']).to.include(el.type))
})
it('nodes have correct label', () => {