Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

Fix unit test warning with many-to-many #332

Open
hdurix opened this issue Mar 29, 2019 · 0 comments
Open

Fix unit test warning with many-to-many #332

hdurix opened this issue Mar 29, 2019 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@hdurix
Copy link
Member

hdurix commented Mar 29, 2019

Overview of the issue

In update management spec, when the entity has got a many-to-many relationship and is owner-side, there is a Jest error:

<select multiple v-model="post.tags"> expects an Array value for its binding, but got Undefined
Reproduce the error

It can be reproduce with https://github.com/jhipster/jdl-samples/blob/master/microservices-blog-store.jh#L52-L83.

Suggest a Fix

In the test, many-to-many should be initialized, like this:

const entity = { id: 123, tags: [] };

For that, we should iterate on the many-to-many relationships in this test and this test like we do for the implementation.

@hdurix hdurix added bug Something isn't working good first issue Good for newcomers labels Mar 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant