seeing multiple error while trying to run unit test
kuldiprindani opened this issue · 2 comments
- typo error resulting in compilation error with name of vector component.
src\app\components\vector-map\vector-map.component.spec.ts
VectorMapComponent instead of VectorMapComponent1
- Errors while running unit test.
Chrome 96.0.4664 (Windows 10.0.0): Executed 4 of 17 (3 FAILED) (0 secs / 0.142 secs)
Chrome 96.0.4664 (Windows 10.0.0) AdminLayoutComponent should create FAILED
NullInjectorError: R3InjectorError(DynamicTestModule)[Router -> Router]:
NullInjectorError: No provider for Router!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'Router', 'Router' ] })
at
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10810:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:25033:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:24747:1)
at lookupTokenUsingModuleInjector (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3296:1)
at getOrCreateInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3408:1)
at ɵɵdirectiveInject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:14415:1)
at NodeInjectorFactory.AdminLayoutComponent_Factory [as factory] (ng:///AdminLayoutComponent/ɵfac.js:5:48)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3503:1)
Error: Expected undefined to be truthy.
at
at UserContext. (http://localhost:9876/_karma_webpack_/src/app/layouts/admin-layout/admin-layout.component.spec.ts:22:23)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1)
at ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-testing.js:305:1)
Chrome 96.0.4664 (Windows 10.0.0): Executed 6 of 17 (4 FAILED) (0 secs / 0.171 secs)
Chrome 96.0.4664 (Windows 10.0.0) AdminLayoutComponent should create FAILED
NullInjectorError: R3InjectorError(DynamicTestModule)[Router -> Router]:
NullInjectorError: No provider for Router!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'Router', 'Router' ] })
at
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10810:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:25033:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:24747:1)
at lookupTokenUsingModuleInjector (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3296:1)
at getOrCreateInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3408:1)
at ɵɵdirectiveInject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:14415:1)
at NodeInjectorFactory.AdminLayoutComponent_Factory [as factory] (ng:///AdminLayoutComponent/ɵfac.js:5:48)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3503:1)
Error: Expected undefined to be truthy.
at
at UserContext. (http://localhost:9876/_karma_webpack_/src/app/layouts/admin-layout/admin-layout.component.spec.ts:22:23)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1)
Chrome 96.0.4664 (Windows 10.0.0) NavbarComponent should create FAILED
NullInjectorError: R3InjectorError(DynamicTestModule)[Router -> Router]:
NullInjectorError: No provider for Router!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'Router', 'Router' ] })
at
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10810:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:25033:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:24747:1)
at lookupTokenUsingModuleInjector (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3296:1)
at getOrCreateInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3408:1)
at ɵɵdirectiveInject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:14415:1)
at NodeInjectorFactory.NavbarComponent_Factory [as factory] (ng:///NavbarComponent/ɵfac.js:6:49)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3503:1)
Error: Expected undefined to be truthy.
at
at UserContext. (http://localhost:9876/_karma_webpack_/src/app/components/navbar/navbar.component.spec.ts:22:23)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1)
at ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-testing.js:305:1)
Chrome 96.0.4664 (Windows 10.0.0): Executed 7 of 17 (5 FAILED) (0 secs / 0.193 secs)
Chrome 96.0.4664 (Windows 10.0.0) NavbarComponent should create FAILED
NullInjectorError: R3InjectorError(DynamicTestModule)[Router -> Router]:
NullInjectorError: No provider for Router!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'Router', 'Router' ] })
at
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10810:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:25033:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:24747:1)
at lookupTokenUsingModuleInjector (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3296:1)
at getOrCreateInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3408:1)
at ɵɵdirectiveInject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:14415:1)
at NodeInjectorFactory.NavbarComponent_Factory [as factory] (ng:///NavbarComponent/ɵfac.js:6:49)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3503:1)
Error: Expected undefined to be truthy.
at
at UserContext. (http://localhost:9876/_karma_webpack_/src/app/components/navbar/navbar.component.spec.ts:22:23)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1)
ERROR: 'NG0304: 'app-auth-navbar' is not a known element:
- If 'app-auth-navbar' is an Angular component, then verify that it is part of this module.
- If 'app-auth-navbar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'
Chrome 96.0.4664 (Windows 10.0.0): Executed 7 of 17 (5 FAILED) (0 secs / 0.193 secs)
ERROR: 'NG0304: 'app-auth-navbar' is not a known element: - If 'app-auth-navbar' is an Angular component, then verify that it is part of this module.
ERROR: 'NG0304: 'router-outlet' is not a known element: - If 'router-outlet' is an Angular component, then verify that it is part of this module.
- If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'
Chrome 96.0.4664 (Windows 10.0.0): Executed 7 of 17 (5 FAILED) (0 secs / 0.193 secs)
ERROR: 'NG0304: 'router-outlet' is not a known element: - If 'router-outlet' is an Angular component, then verify that it is part of this module.
ERROR: 'NG0304: 'app-footer' is not a known element: - If 'app-footer' is an Angular component, then verify that it is part of this module.
- If 'app-footer' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'
Chrome 96.0.4664 (Windows 10.0.0): Executed 7 of 17 (5 FAILED) (0 secs / 0.193 secs)
ERROR: 'NG0304: 'app-footer' is not a known element: - If 'app-footer' is an Angular component, then verify that it is part of this module.
Chrome 96.0.4664 (Windows 10.0.0): Executed 9 of 17 (5 FAILED) (0 secs / 0.217 secs)
02 01 2022 17:08:12.073:ERROR [karma-server]: UnhandledRejection
PS D:\Mytools\agent-ui>
@kuldiprindani this issue was automatically closed because it did not follow the bellow rules:
IMPORTANT: Please use the following link to create a new issue: https://www.creative-tim.com/new-issue/black-dashboard-pro-angular **If your issue was not created using the app above, it will be closed immediately.** Love Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit: 👉 https://www.creative-tim.com/bundles 👉 https://www.creative-tim.com
below is complete error list : above is truncated as it was not letting me raise a issue
typo error resulting in compilation error with name of vector component.
src\app\components\vector-map\vector-map.component.spec.ts
VectorMapComponent instead of VectorMapComponent1
Errors while running unit test.
Chrome 96.0.4664 (Windows 10.0.0): Executed 4 of 17 (3 FAILED) (0 secs / 0.142 secs)
Chrome 96.0.4664 (Windows 10.0.0) AdminLayoutComponent should create FAILED
NullInjectorError: R3InjectorError(DynamicTestModule)[Router -> Router]:
NullInjectorError: No provider for Router!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'Router', 'Router' ] })
at
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10810:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:25033:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:24747:1)
at lookupTokenUsingModuleInjector (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3296:1)
at getOrCreateInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3408:1)
at ɵɵdirectiveInject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:14415:1)
at NodeInjectorFactory.AdminLayoutComponent_Factory [as factory] (ng:///AdminLayoutComponent/ɵfac.js:5:48)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3503:1)
Error: Expected undefined to be truthy.
at
at UserContext. (http://localhost:9876/_karma_webpack_/src/app/layouts/admin-layout/admin-layout.component.spec.ts:22:23)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1)
at ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-testing.js:305:1)
Chrome 96.0.4664 (Windows 10.0.0): Executed 6 of 17 (4 FAILED) (0 secs / 0.171 secs)
Chrome 96.0.4664 (Windows 10.0.0) AdminLayoutComponent should create FAILED
NullInjectorError: R3InjectorError(DynamicTestModule)[Router -> Router]:
NullInjectorError: No provider for Router!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'Router', 'Router' ] })
at
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10810:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:25033:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:24747:1)
at lookupTokenUsingModuleInjector (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3296:1)
at getOrCreateInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3408:1)
at ɵɵdirectiveInject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:14415:1)
at NodeInjectorFactory.AdminLayoutComponent_Factory [as factory] (ng:///AdminLayoutComponent/ɵfac.js:5:48)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3503:1)
Error: Expected undefined to be truthy.
at
at UserContext. (http://localhost:9876/_karma_webpack_/src/app/layouts/admin-layout/admin-layout.component.spec.ts:22:23)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1)
Chrome 96.0.4664 (Windows 10.0.0) NavbarComponent should create FAILED
NullInjectorError: R3InjectorError(DynamicTestModule)[Router -> Router]:
NullInjectorError: No provider for Router!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'Router', 'Router' ] })
at
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10810:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:25033:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:24747:1)
at lookupTokenUsingModuleInjector (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3296:1)
at getOrCreateInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3408:1)
at ɵɵdirectiveInject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:14415:1)
at NodeInjectorFactory.NavbarComponent_Factory [as factory] (ng:///NavbarComponent/ɵfac.js:6:49)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3503:1)
Error: Expected undefined to be truthy.
at
at UserContext. (http://localhost:9876/_karma_webpack_/src/app/components/navbar/navbar.component.spec.ts:22:23)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1)
at ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-testing.js:305:1)
Chrome 96.0.4664 (Windows 10.0.0): Executed 7 of 17 (5 FAILED) (0 secs / 0.193 secs)
Chrome 96.0.4664 (Windows 10.0.0) NavbarComponent should create FAILED
NullInjectorError: R3InjectorError(DynamicTestModule)[Router -> Router]:
NullInjectorError: No provider for Router!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'Router', 'Router' ] })
at
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10810:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10977:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:25033:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:24747:1)
at lookupTokenUsingModuleInjector (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3296:1)
at getOrCreateInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3408:1)
at ɵɵdirectiveInject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:14415:1)
at NodeInjectorFactory.NavbarComponent_Factory [as factory] (ng:///NavbarComponent/ɵfac.js:6:49)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:3503:1)
Error: Expected undefined to be truthy.
at
at UserContext. (http://localhost:9876/_karma_webpack_/src/app/components/navbar/navbar.component.spec.ts:22:23)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1)
ERROR: 'NG0304: 'app-auth-navbar' is not a known element:
If 'app-auth-navbar' is an Angular component, then verify that it is part of this module.
If 'app-auth-navbar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'
Chrome 96.0.4664 (Windows 10.0.0): Executed 7 of 17 (5 FAILED) (0 secs / 0.193 secs)
ERROR: 'NG0304: 'app-auth-navbar' is not a known element:
If 'app-auth-navbar' is an Angular component, then verify that it is part of this module.
ERROR: 'NG0304: 'router-outlet' is not a known element:
If 'router-outlet' is an Angular component, then verify that it is part of this module.
If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'
Chrome 96.0.4664 (Windows 10.0.0): Executed 7 of 17 (5 FAILED) (0 secs / 0.193 secs)
ERROR: 'NG0304: 'router-outlet' is not a known element:
If 'router-outlet' is an Angular component, then verify that it is part of this module.
ERROR: 'NG0304: 'app-footer' is not a known element:
If 'app-footer' is an Angular component, then verify that it is part of this module.
If 'app-footer' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'
Chrome 96.0.4664 (Windows 10.0.0): Executed 7 of 17 (5 FAILED) (0 secs / 0.193 secs)
ERROR: 'NG0304: 'app-footer' is not a known element:
If 'app-footer' is an Angular component, then verify that it is part of this module.
Chrome 96.0.4664 (Windows 10.0.0): Executed 9 of 17 (5 FAILED) (0 secs / 0.217 secs)
02 01 2022 17:08:12.073:ERROR [karma-server]: UnhandledRejection