本文整理汇总了TypeScript中ng2-toastr.ToastModule.forRoot方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ToastModule.forRoot方法的具体用法?TypeScript ToastModule.forRoot怎么用?TypeScript ToastModule.forRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ng2-toastr.ToastModule
的用法示例。
在下文中一共展示了ToastModule.forRoot方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: describe
describe('PoolListComponent', () => {
let component: PoolListComponent;
let fixture: ComponentFixture<PoolListComponent>;
configureTestBed({
declarations: [PoolListComponent, MirrorHealthColorPipe],
imports: [
SharedModule,
BsDropdownModule.forRoot(),
TabsModule.forRoot(),
ProgressbarModule.forRoot(),
HttpClientTestingModule,
RouterTestingModule,
ToastModule.forRoot()
],
providers: i18nProviders
});
beforeEach(() => {
fixture = TestBed.createComponent(PoolListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
示例2: describe
describe('RbdListComponent', () => {
let component: RbdListComponent;
let fixture: ComponentFixture<RbdListComponent>;
configureTestBed({
imports: [
SharedModule,
BsDropdownModule.forRoot(),
TabsModule.forRoot(),
ModalModule.forRoot(),
TooltipModule.forRoot(),
ToastModule.forRoot(),
AlertModule.forRoot(),
ComponentsModule,
RouterTestingModule,
HttpClientTestingModule
],
declarations: [RbdListComponent, RbdDetailsComponent, RbdSnapshotListComponent]
});
beforeEach(() => {
fixture = TestBed.createComponent(RbdListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
示例3: describe
describe('UserTabsComponent', () => {
let component: UserTabsComponent;
let fixture: ComponentFixture<UserTabsComponent>;
configureTestBed({
imports: [
SharedModule,
ToastModule.forRoot(),
TabsModule.forRoot(),
RouterTestingModule,
HttpClientTestingModule
],
declarations: [UserTabsComponent]
});
beforeEach(() => {
fixture = TestBed.createComponent(UserTabsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
示例4: describe
describe('RbdSnapshotFormComponent', () => {
let component: RbdSnapshotFormComponent;
let fixture: ComponentFixture<RbdSnapshotFormComponent>;
configureTestBed({
imports: [
ReactiveFormsModule,
ComponentsModule,
HttpClientTestingModule,
ServicesModule,
ApiModule,
ToastModule.forRoot(),
RouterTestingModule
],
declarations: [RbdSnapshotFormComponent],
providers: [BsModalRef, BsModalService, AuthStorageService, i18nProviders]
});
beforeEach(() => {
fixture = TestBed.createComponent(RbdSnapshotFormComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
示例5: describe
describe('RbdImagesComponent', () => {
let component: RbdImagesComponent;
let fixture: ComponentFixture<RbdImagesComponent>;
configureTestBed({
declarations: [
RbdDetailsComponent,
RbdImagesComponent,
RbdListComponent,
RbdSnapshotListComponent,
RbdTrashListComponent,
RbdConfigurationListComponent
],
imports: [
HttpClientTestingModule,
RouterTestingModule,
SharedModule,
TabsModule.forRoot(),
ToastModule.forRoot(),
TooltipModule.forRoot()
],
providers: [TaskListService, i18nProviders]
});
beforeEach(() => {
fixture = TestBed.createComponent(RbdImagesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
示例6: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule, ToastModule.forRoot()],
declarations: [AppComponent],
schemas: [NO_ERRORS_SCHEMA],
providers: [{ provide: AuthStorageService, useValue: fakeService }]
}).compileComponents();
}));
示例7: describe
describe('RbdFormComponent', () => {
let component: RbdFormComponent;
let fixture: ComponentFixture<RbdFormComponent>;
let activatedRoute: ActivatedRouteStub;
configureTestBed({
imports: [
HttpClientTestingModule,
ReactiveFormsModule,
RouterTestingModule,
ToastModule.forRoot(),
SharedModule
],
declarations: [RbdFormComponent],
providers: [
{
provide: ActivatedRoute,
useValue: new ActivatedRouteStub({ pool: 'foo', name: 'bar', snap: undefined })
},
i18nProviders
]
});
beforeEach(() => {
fixture = TestBed.createComponent(RbdFormComponent);
component = fixture.componentInstance;
activatedRoute = TestBed.get(ActivatedRoute);
});
it('should create', () => {
expect(component).toBeTruthy();
});
describe('should test decodeURIComponent of params', () => {
let rbdService: RbdService;
beforeEach(() => {
rbdService = TestBed.get(RbdService);
component.mode = RbdFormMode.editing;
fixture.detectChanges();
spyOn(rbdService, 'get').and.callThrough();
});
it('without snapName', () => {
activatedRoute.setParams({ pool: 'foo%2Ffoo', name: 'bar%2Fbar', snap: undefined });
expect(rbdService.get).toHaveBeenCalledWith('foo/foo', 'bar/bar');
expect(component.snapName).toBeUndefined();
});
it('with snapName', () => {
activatedRoute.setParams({ pool: 'foo%2Ffoo', name: 'bar%2Fbar', snap: 'baz%2Fbaz' });
expect(rbdService.get).toHaveBeenCalledWith('foo/foo', 'bar/bar');
expect(component.snapName).toBe('baz/baz');
});
});
});
示例8: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
ToastModule.forRoot()
],
declarations: [
AppComponent
],
}).compileComponents();
}));
示例9: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
SharedModule,
ToastModule.forRoot(),
TabsModule.forRoot(),
RouterTestingModule,
HttpClientTestingModule
],
declarations: [RoleDetailsComponent]
}).compileComponents();
}));
示例10: async
async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
CoreModule,
SharedModule,
ToastModule.forRoot(),
ClusterModule,
BlockModule
],
declarations: [AppComponent]
}).compileComponents();
})