Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
NbThemeModule.forRoot(),
NbOverlayModule.forRoot(),
NbLayoutModule,
PortalModule,
RouterTestingModule.withRoutes([]),
],
});
// Have to create layout component as it's required for scroll service to work properly.
// Also it registers overlay container so we don't have to create it manually.
TestBed.createComponent(NbLayoutComponent);
overlayHostElement = document.createElement('div');
overlayHostElement.style.width = '10px';
overlayHostElement.style.height = '10px';
overlayHostElement.style.backgroundColor = 'red';
document.body.appendChild(overlayHostElement);
ConfirmDeleteComponent,
],
imports: [
BrowserModule,
FormsModule,
HttpClientModule,
AppRoutingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: (HttpLoaderFactory),
deps: [HttpClient]
}
}),
BrowserAnimationsModule,
NbThemeModule.forRoot({ name: 'cosmic' }),
NbLayoutModule,
NbEvaIconsModule,
NbSidebarModule.forRoot(), // NbSidebarModule.forRoot(), //if this is your app.module
NbButtonModule,
NbActionsModule,
NbSearchModule,
NbIconModule,
NbMenuModule.forRoot(),
NbTooltipModule,
NbCardModule,
NbInputModule,
NbCheckboxModule,
NbSelectModule,
NbDialogModule.forRoot(),
NgxMaskModule.forRoot(),
NbToastrModule.forRoot(),
RoleListComponent,
PermissionComponent,
HomeComponent,
LogoutComponent,
UserProfileComponent,
PictureStaticResourceComponent,
AudioStaticResourceComponent,
VideoStaticResourceComponent,
],
imports: [
FormsModule,
HttpClientModule,
BrowserModule,
BrowserAnimationsModule,
RouterModule.forRoot(routes, {useHash: true}),
NbThemeModule.forRoot({name: 'corporate'}),
NbLayoutModule,
NbSidebarModule,
NbMenuModule,
ToasterModule,
NbActionsModule,
NbAlertModule,
NbCardModule,
NbUserModule,
NbPopoverModule,
NbSearchModule,
NbContextMenuModule,
NbCheckboxModule,
FileUploadModule,
NbProgressBarModule,
PaginationModule.forRoot(),
TooltipModule.forRoot(),
beforeEach(fakeAsync(() => {
showTriggerStub = new Subject();
hideTriggerStub = new Subject();
triggerBuilderStub = {
trigger() { return this },
host() { return this },
container() { return this },
destroy() {},
build() {
return { show$: showTriggerStub, hide$: hideTriggerStub };
},
};
TestBed.configureTestingModule({
imports: [ RouterTestingModule.withRoutes([]), NbThemeModule.forRoot(), NbLayoutModule, NbSelectModule ],
declarations: [ BasicSelectTestComponent ],
});
TestBed.overrideProvider(NbTriggerStrategyBuilderService, { useValue: triggerBuilderStub });
fixture = TestBed.createComponent(BasicSelectTestComponent);
fixture.detectChanges();
flush();
selectComponent = fixture.debugElement.query(By.directive(NbSelectComponent)).componentInstance;
}));
NarikCoreModule.forRoot({
configFilePath: "assets/app-config.json",
defaultLang: "en",
useDefaultLang: true,
commandProcessor: DemoCommandProcessor
}),
NarikUiCoreModule,
NarikAppCoreModule.forRoot({}),
NarikJwtAuthenticationModule.forRoot({
loginEndPoint: "api/account/Authenticate",
logoutEndPoint: "api/account/Logout",
refreshEndPoint: "api/account/Authenticate",
tokenStorage: "localStorage",
loginPageUrl: "/"
}),
NbThemeModule.forRoot(
{ name: "default" },
undefined,
undefined,
NbLayoutDirection.LTR
),
BrowserAnimationsModule,
NarikClientStorageModule.forRoot(),
NarikNgxAdmin,
ShareModule
],
providers: [
{
provide: MODULE_DATA_KEY,
useValue: moduleKey
},
{
NarikCoreModule.forRoot({
configFilePath: "assets/app-config.json",
defaultLang: "en",
useDefaultLang: true,
commandProcessor: DemoCommandProcessor
}),
NarikUiCoreModule,
NarikAppCoreModule.forRoot({}),
NarikJwtAuthenticationModule.forRoot({
loginEndPoint: "api/account/Authenticate",
logoutEndPoint: "api/account/Logout",
refreshEndPoint: "api/account/Authenticate",
tokenStorage: "localStorage",
loginPageUrl: "/"
}),
NbThemeModule.forRoot(
{ name: "default" },
undefined,
undefined,
NbLayoutDirection.LTR
),
BrowserAnimationsModule,
NarikClientStorageModule.forRoot(),
NarikNgxAdmin,
ShareModule
],
providers: [
{
provide: MODULE_DATA_KEY,
useValue: moduleKey
},
{
function setupFixture(
componentType: Type,
columns: string[],
data?: TreeNode[],
): ComponentFixture {
TestBed.configureTestingModule({
imports: [ NbThemeModule.forRoot(), NbTreeGridModule ],
declarations: [ componentType ],
});
const fixture = TestBed.createComponent(componentType);
fixture.componentInstance.columns = columns;
if (data) {
fixture.componentInstance.dataSource = data;
}
fixture.detectChanges();
return fixture;
}
import { RouterModule } from '@angular/router';
import { NbEvaIconsModule } from '@nebular/eva-icons';
import { NbButtonModule, NbIconModule, NbLayoutModule, NbThemeModule } from '@nebular/theme';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NetworkSelectModule } from './components/network-select/network-select.module';
import { NetworkSelectService } from './components/network-select/network-select.service';
import { TaquitoService } from './taquito.service';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
AppRoutingModule,
NbThemeModule.forRoot(),
BrowserAnimationsModule,
NbLayoutModule,
NbButtonModule,
NbEvaIconsModule,
NbIconModule,
RouterModule,
NetworkSelectModule,
],
providers: [TaquitoService, NetworkSelectService],
bootstrap: [AppComponent],
})
export class AppModule {}
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule.withRoutes([]),
NoopAnimationsModule,
NbThemeModule.forRoot(),
NbSidebarModule.forRoot(),
NbMenuModule.forRoot(),
],
declarations: [ SidebarExpandTestComponent ],
});
});
LandingComponent,
SlideAuthComponent,
OdmDetailComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
HttpModule,
ROUTING,
RouterModule,
SharedModule,
NbLayoutModule,
NbSidebarModule,
NbAlertModule,
NbThemeModule.forRoot({ name: 'default' }),
],
providers: [
Provider,
SignupService,
LoginService,
ListingService,
BookingService,
CheckinService,
AuthGuardService,
EthereumService,
EmailService,
OdmService,
AuthService,
XrpService,
NbSidebarService
],