Угловые ошибки тестирования кармы всех компонентов - PullRequest
0 голосов
/ 09 ноября 2019

Мое приложение загружается без проблем, но когда я пробую ng test или npm test, у меня возникает много ошибок всех компонентов. Прежде всего, у меня была проблема с app.e2e-2pec.ts с этой строкой кода expect(page.getTitleText()).toEqual('frontend app is running!'); Ошибка была:

ERROR in e2e/src/app.e2e-spec.ts:16:41 - error TS2345: Argument of type '"frontend app is running!"' is not assignable to parameter of type 'Expected<Promise<string>>'.

Решение для этого:

expect<any>(.....)

После этого я столкнулся с кучей ошибок во всей тестовой среде под Karma. Только некоторые из них


Chrome 78.0.3904 (Linux 0.0.0) ApiService should be created FAILED
        NullInjectorError: StaticInjectorError(DynamicTestModule)[HttpClient]: 
          StaticInjectorError(Platform: core)[HttpClient]: 
            NullInjectorError: No provider for HttpClient!
        error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ Function ] })
            at <Jasmine>
            at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:855:1)
            at resolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17514:1)
            at tryResolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17440:1)
            at StaticInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17266:1)
            at resolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17514:1)
            at tryResolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17440:1)
            at StaticInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17266:1)
            at resolveNgModuleDep (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:30393:1)
            at NgModuleRef_.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:31578:1)
            at injectInjectorOnly (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:734:1)
Chrome 78.0.3904 (Linux 0.0.0): Executed 1 of 9 (1 FAILED) (0 secs / 0.039 secs)
Chrome 78.0.3904 (Linux 0.0.0) ApiService should be created FAILED
        NullInjectorError: StaticInjectorError(DynamicTestModule)[HttpClient]: 
          StaticInjectorError(Platform: core)[HttpClient]: 
            NullInjectorError: No provider for HttpClient!
        error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ Function ] })
            at <Jasmine>
            at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:855:1)
            at resolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17514:1)
            at tryResolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17440:1)
            at StaticInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17266:1)
            at resolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17514:1)
            at tryResolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17440:1)
            at StaticInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17266:1)
            at resolveNgModuleDep (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:30393:1)
            at NgModuleRef_.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:31578:1)
Chrome 78.0.3904 (Linux 0.0.0) NotesServiceService should be created FAILED
        NullInjectorError: StaticInjectorError(DynamicTestModule)[HttpClient]: 
          StaticInjectorError(Platform: core)[HttpClient]: 
            NullInjectorError: No provider for HttpClient!
        error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ Function ] })
            at <Jasmine>
            at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:855:1)
            at resolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17514:1)
            at tryResolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17440:1)
            at StaticInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17266:1)
            at resolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17514:1)
            at tryResolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17440:1)
            at StaticInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17266:1)
            at resolveNgModuleDep (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:30393:1)
            at NgModuleRef_.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:31578:1)
            at injectInjectorOnly (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:734:1)
Chrome 78.0.3904 (Linux 0.0.0): Executed 5 of 9 (2 FAILED) (0 secs / 0.068 secs)
Chrome 78.0.3904 (Linux 0.0.0) NotesServiceService should be created FAILED
        NullInjectorError: StaticInjectorError(DynamicTestModule)[HttpClient]: 
          StaticInjectorError(Platform: core)[HttpClient]: 
            NullInjectorError: No provider for HttpClient!
        error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ Function ] })
            at <Jasmine>
            at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:855:1)
            at resolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17514:1)
            at tryResolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17440:1)
            at StaticInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17266:1)
            at resolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17514:1)
            at tryResolveToken (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17440:1)
            at StaticInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:17266:1)
            at resolveNgModuleDep (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:30393:1)
            at NgModuleRef_.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/fesm2015/core.js:31578:1)



Chrome 78.0.3904 (Linux 0.0.0) AppComponent should render title FAILED
        Failed: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
        error properties: Object({ ngSyntaxError: true })
        Error: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
            at syntaxError (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:2175:1)
            at CompileMetadataResolver._addTypeToModule (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20215:1)
            at http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20115:1
            at <Jasmine>
            at CompileMetadataResolver.getNgModuleMetadata (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20106:1)
            at JitCompiler._loadModules (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25824:1)
            at JitCompiler._compileModuleAndAllComponents (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25813:1)
            at JitCompiler.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25775:1)
            at CompilerImpl.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js:244:1)
            at TestingCompilerImpl.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/testing.js:159:1)
        Error: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
        error properties: Object({ ngSyntaxError: true })
            at syntaxError (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:2175:1)
            at CompileMetadataResolver._addTypeToModule (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20215:1)
            at http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20115:1
            at <Jasmine>
            at CompileMetadataResolver.getNgModuleMetadata (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20106:1)
            at JitCompiler._loadModules (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25824:1)
            at JitCompiler._compileModuleAndAllComponents (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25813:1)
            at JitCompiler.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25772:1)
            at CompilerImpl.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js:232:1)
            at TestingCompilerImpl.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/testing.js:151:1)
Chrome 78.0.3904 (Linux 0.0.0): Executed 7 of 9 (3 FAILED) (0 secs / 0.133 secs)
Chrome 78.0.3904 (Linux 0.0.0) AppComponent should render title FAILED
        Failed: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
        error properties: Object({ ngSyntaxError: true })
        Error: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
            at syntaxError (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:2175:1)
            at CompileMetadataResolver._addTypeToModule (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20215:1)
            at http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20115:1
            at <Jasmine>
            at CompileMetadataResolver.getNgModuleMetadata (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20106:1)
            at JitCompiler._loadModules (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25824:1)
            at JitCompiler._compileModuleAndAllComponents (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25813:1)
            at JitCompiler.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25775:1)
            at CompilerImpl.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js:244:1)
            at TestingCompilerImpl.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/testing.js:159:1)
        Error: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
        error properties: Object({ ngSyntaxError: true })
            at syntaxError (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:2175:1)
            at CompileMetadataResolver._addTypeToModule (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20215:1)
            at http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20115:1
            at <Jasmine>
            at CompileMetadataResolver.getNgModuleMetadata (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20106:1)
            at JitCompiler._loadModules (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25824:1)
            at JitCompiler._compileModuleAndAllComponents (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25813:1)
            at JitCompiler.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25772:1)
            at CompilerImpl.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js:232:1)
            at TestingCompilerImpl.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynaChrome 78.0.3904 (Linux 0.0.0) AppComponent should have as title 'frontend' FAILED



   Failed: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
        error properties: Object({ ngSyntaxError: true })
        Error: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
            at syntaxError (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:2175:1)
            at CompileMetadataResolver._addTypeToModule (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20215:1)
            at http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20115:1
            at <Jasmine>
            at CompileMetadataResolver.getNgModuleMetadata (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20106:1)
            at JitCompiler._loadModules (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25824:1)
            at JitCompiler._compileModuleAndAllComponents (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25813:1)
            at JitCompiler.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25775:1)
            at CompilerImpl.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js:244:1)
            at TestingCompilerImpl.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/testing.js:159:1)
        Error: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
        error properties: Object({ ngSyntaxError: true })
            at syntaxError (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:2175:1)
            at CompileMetadataResolver._addTypeToModule (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20215:1)
            at http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20115:1
            at <Jasmine>
            at CompileMetadataResolver.getNgModuleMetadata (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20106:1)
            at JitCompiler._loadModules (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25824:1)
            at JitCompiler._compileModuleAndAllComponents (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25813:1)
            at JitCompiler.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25772:1)
            at CompilerImpl.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js:232:1)
            at TestingCompilerImpl.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/testing.js:151:1)
Chrome 78.0.3904 (Linux 0.0.0): Executed 9 of 9 (5 FAILED) (0 secs / 0.181 secs)
Chrome 78.0.3904 (Linux 0.0.0) AppComponent should create the app FAILED
        Failed: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
        error properties: Object({ ngSyntaxError: true })
        Error: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
            at syntaxError (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:2175:1)
            at CompileMetadataResolver._addTypeToModule (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20215:1)
            at http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20115:1
            at <Jasmine>
            at CompileMetadataResolver.getNgModuleMetadata (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20106:1)
            at JitCompiler._loadModules (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25824:1)
            at JitCompiler._compileModuleAndAllComponents (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25813:1)
            at JitCompiler.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25775:1)
            at CompilerImpl.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js:244:1)
            at TestingCompilerImpl.compileModuleAndAllComponentsAsync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/testing.js:159:1)
        Error: Type AppComponent is part of the declarations of 2 modules: AppModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppModule and DynamicTestModule.
        error properties: Object({ ngSyntaxError: true })
            at syntaxError (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:2175:1)
            at CompileMetadataResolver._addTypeToModule (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20215:1)
            at http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20115:1
            at <Jasmine>
            at CompileMetadataResolver.getNgModuleMetadata (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:20106:1)
            at JitCompiler._loadModules (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25824:1)
            at JitCompiler._compileModuleAndAllComponents (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25813:1)
            at JitCompiler.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/compiler/fesm2015/compiler.js:25772:1)
            at CompilerImpl.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js:232:1)
            at TestingCompilerImpl.compileModuleAndAllComponentsSync (http://localhost:9876/_karma_webpack_/node_modules/@angular/platform-browser-dynaChrome 78.0.3904 (Linux 0.0.0): Executed 9 of 9 (5 FAILED) (0.443 secs / 0.181 secs)
TOTAL: 5 FAILED, 4 SUCCESS
TOTAL: 5 FAILED, 4 SUCCESS


После этих ошибок я изменил свой TestBed в app.component.spec.ts и добавил

schemas: [CUSTOM_ELEMENTS_SCHEMA]

Но это такжетакой же. Я пытаюсь протестировать угловое приложение в первый раз, и я немного запутался. Увидел этот вопрос: Элемент не известен ошибка в Карме при запуске "тест NG"

Также мое приложение работает нормально, оно подключается к бэкэнду и все основные функции были выполнены. Любая помощь будет принята с благодарностью.

решено: Спасибо, ребята, за помощь, пользователь Pace помог мне. Когда я создавал свои компоненты, я всегда удалял файлы spec.ts, потому что они нужны мне для выполнения модульного тестирования сервисов и фильтрации каналов, но была допущена одна ошибка :). В начале создания приложения с использованием углового клика я не удалял app.component.spec.ts, поэтому эти ошибки имеют смысл, поскольку этот компонент хотел загрузить все остальные компоненты для целей тестирования, но не смог найти их тестовые файлы. Я большой новичок в Angular, и мне становится немного страшно, когда я вижу такие большие ошибки, хаха :))

...