Skip to content

indexes wrong format in integration test #2809

@ghost

Description

I've written an integration test for a function from a repository. I want to check if the model is created correctly but when i am calling "npm test" i am getting an error.
In the function i am accessing the index definition with "repository.modelClass.definition.settings.indexes.preisliste_bku".
When i start the app and debug to this point, the value of the index is an array of objects so that i can use the forEach loop.

The index definition in the "Preisliste"-model:
image

The array of objects:
image

But when i am calling the function from the test i am getting the error because "bku.keys" is not an array of objects but an object so the forEach loop does not work.

The format of bku.keys in the test:
image

I do not understand why the format is diffrent when i start the app and when i am running the test.

Hope the information are sufficient. Thank you guys for any response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions