【问题标题】:Jest, NestJS, TypeORM End To End TestingJest、NestJS、TypeORM 端到端测试
【发布时间】:2020-10-23 06:59:33
【问题描述】:

在 NestJS 教程中,E2E 测试是使用导入的单个示例模块设置的。 这种模式似乎不适用于 typeORM 实体之间关系更复杂的应用程序。在广泛检查相关文件中有no inconsistencies in import statements 并且没有丢失TypeOrmModule.forFeature() 之后,我放弃并简单地导入了我的整个AppModule(我的应用程序的根模块——与NestJS 默认相同)。

【问题讨论】:

    标签: jestjs linker-errors nestjs e2e-testing typeorm


    【解决方案1】:

    简而言之,如果您正在查看表单

    Error: Entity metadata for EntityA#entityB was not found. 
    Check if you specified a correct entity object and if it's connected in the connection options.
    

    您可以尝试导入所有相关模块或直接导入整个应用程序。

    【讨论】:

      猜你喜欢
      • 2022-01-06
      • 2022-08-02
      • 2019-08-29
      • 2021-12-30
      • 1970-01-01
      • 2017-12-26
      • 2020-11-16
      • 1970-01-01
      • 2020-02-13
      相关资源
      最近更新 更多