You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.
right now I have my services set up like this according to the feathers generator:
const { Service } = require('feathers-mongodb');
exports.AdminAction = class AdminAction extends Service {
constructor(options, app) {
super(options);
app.get('mongoClient').then(db => {
this.Model = db.collection('admin-actions');
});
}
};
This works, but when I try to run tests, my problem is, that during application start, the models are not set yet, because the promise hasn't resolved yet. This makes all my tests fail, because they can't access the model in order to run database queries.
What is the recommended solution for this scenario?
Thanks & Best Regards
The text was updated successfully, but these errors were encountered:
right now I have my services set up like this according to the feathers generator:
This works, but when I try to run tests, my problem is, that during application start, the models are not set yet, because the promise hasn't resolved yet. This makes all my tests fail, because they can't access the model in order to run database queries.
What is the recommended solution for this scenario?
Thanks & Best Regards
The text was updated successfully, but these errors were encountered: