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

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

@hdurix

Description

@hdurix
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions