I read an article about testing Ionic2 projects with TestBed, and I have problems when I try to repeat the example from the article in my environment. When I try to start the tests in Step 3 , I have a "No provider for StatusBar" error.
This may be a stupid question, but can anyone guess why this is happening?
The StatusBar is included (imported) in my app.component.ts file .
import { StatusBar } from '@ionic-native/status-bar';
TestBed @NgModule . , , , , .
, , ( , , NgModule), .
TestBed.configureTestingModule({ ......, providers: [ StatusBar ] })
TestBed.configureTestingModule({ imports: [ ModuleContainingStatusBar ] })
(, , , StatusBar )
providers @NgModule
providers
@NgModule
Source: https://habr.com/ru/post/1015986/More articles:What is CSS color name: background? - cssHow to remove broken ListViewItem background in UWP? - c #Do we get all the Firebase data as a cache after enabling standalone features in android? - androidApache spark error: not found: sqlContext value - scalaEntity database engine updates many for many - asp.net-coreHow to use Basic auth in swagger ui v.3.0 - swagger-uiWhat does in Proguard warped traffic? - deobfuscationDisabling graphs when starting unittests - pythonискры в windows:: 16: ошибка: не найден: значение sqlContext - javaTFS 2017 Build автоматически запускается и продолжает сбой - gitAll Articles