-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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:

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:

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.
