Код: Выделить всё
const asyncProviders = this.createAsyncProviders(options);
const databaseOptionsModule = {
module: MongoModule,
imports: [...(options.imports ?? [])],
providers: [...asyncProviders],
exports: [MONGO_MODULE_OPTIONS],
};
, но это не помогло. Когда я запускаю тесты E2E, я продолжаю получать это сообщение об ошибке: < /p>
Код: Выделить всё
$ pnpm test:e2e
> bugs@0.0.1 test:e2e /home/kasir/projects/bugs
> jest --config ./test/jest-e2e.json
FAIL test/app.e2e-spec.ts
AppController (e2e)
✕ / (GET) (6 ms)
● AppController (e2e) › / (GET)
Nest can't resolve dependencies of the MongooseModuleOptions (?). Please make sure that the argument Symbol(MONGO_MODULE_OPTIONS) at index [0] is available in the MongooseCoreModule context.
Potential solutions:
- Is MongooseCoreModule a valid NestJS module?
- If Symbol(MONGO_MODULE_OPTIONS) is a provider, is it part of the current MongooseCoreModule?
- If Symbol(MONGO_MODULE_OPTIONS) is exported from a separate @Module, is that module imported within MongooseCoreModule?
@Module({
imports: [ /* the Module containing Symbol(MONGO_MODULE_OPTIONS) */ ]
})
Подробнее здесь: https://stackoverflow.com/questions/797 ... ct-options
Мобильная версия