Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { CustomStorage } from './services/custom-storage.service';
import { NgxsStoragePluginOptions } from '@ngxs/storage-plugin/src/symbols';
@NgModule({
providers: [
CoreService,
],
exports: [
ClarityModule,
ClrFormsNextModule,
],
imports: [
CommonModule,
HttpClientModule,
// NgxPageScrollModule,
NgxsModule.forRoot([]),
NgxsFormPluginModule.forRoot(),
NgxsRouterPluginModule.forRoot(),
ClarityModule,
ClrFormsNextModule,
GraphqlModule,
AuthModule,
I18nModule,
NgxsReduxDevtoolsPluginModule.forRoot({
disabled: environment.production,
}),
NgxsStoragePluginModule.forRoot({
key: 'auth.token',
}),
]
})
export class CoreModule {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [NgxsModule.forRoot([LastPersonsState])]
}).compileComponents();
store = TestBed.get(Store);
store.reset({
lastpersons: []
});
}));
it('it adds LastPerson on Top', () => {
})
class FeatureState {}
interface FeatureStateModel2 {
baz: string;
}
@State({
name: 'feature2',
defaults: {
baz: '!'
}
})
class FeatureState2 {}
@NgModule({
imports: [NgxsModule.forRoot([RootState])]
})
class RootModule {}
@NgModule({
imports: [NgxsModule.forFeature([FeatureState])]
})
class FeatureModule {}
@NgModule({
imports: [NgxsModule.forFeature([FeatureState])]
})
class FeatureModule2 {}
describe('module', () => {
it('should configure and run with no states', () => {
TestBed.configureTestingModule({
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
NoopAnimationsModule,
NgxsModule.forRoot(AuthStates),
MatInputModule,
MatCardModule,
ReactiveFormsModule,
],
declarations: [LoginPageComponent, LoginFormComponent],
providers: [AuthService],
});
fixture = TestBed.createComponent(LoginPageComponent);
instance = fixture.componentInstance;
store = TestBed.get(Store);
spyOn(store, 'dispatch').and.callThrough();
});
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
CoreModule.forRoot(),
HttpClientModule,
NoopAnimationsModule,
NgxsModule.forRoot(BooksStates),
MatCardModule,
MatInputModule,
RouterTestingModule,
],
declarations: [
CollectionPageComponent,
BookPreviewListComponent,
BookPreviewComponent,
BookAuthorsComponent,
AddCommasPipe,
EllipsisPipe,
],
});
fixture = TestBed.createComponent(CollectionPageComponent);
instance = fixture.componentInstance;
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { NgxsModule } from '@ngxs/store';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgxsModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
import { SettingManagementConfigModule } from '@abp/ng.setting-management.config';
const LOGGERS = [NgxsLoggerPluginModule.forRoot({ disabled: false })];
@NgModule({
declarations: [AppComponent],
imports: [
CoreModule.forRoot({
environment,
requirements: {
layouts: LAYOUTS,
},
}),
ThemeSharedModule.forRoot(),
OAuthModule.forRoot(),
NgxsModule.forRoot([]),
AccountConfigModule.forRoot({ redirectUrl: '/' }),
IdentityConfigModule,
TenantManagementConfigModule,
SettingManagementConfigModule,
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
SharedModule,
...(environment.production ? [] : LOGGERS),
],
bootstrap: [AppComponent],
})
export class AppModule {}
beforeEach(() => {
TestBed.configureTestingModule({
providers: [CodeGenService],
imports: [
NgxsModule.forRoot([UiState, CodeGenState]),
MatSnackBarModule,
HttpClientTestingModule
]
});
});
beforeEach(async(() => {
TestBed.configureTestingModule({
schemas: [NO_ERRORS_SCHEMA],
imports: [
NgxsModule.forRoot([XStore]),
MatMenuModule,
MatSnackBarModule
],
providers: [
{
provide: CodeGenService,
useValue: codeGenService
}
],
declarations: [EditorContainerComponent]
}).compileComponents();
store = TestBed.get(Store);
}));
const SERVICES = [
LU3270Service
];
@NgModule({
bootstrap: [RootPageComponent],
declarations: [
...COMPONENTS
],
imports: [
...MODULES,
NgxsModule.forRoot(states),
NgxsLoggerPluginModule.forRoot({
collapsed: false,
logger: console
}),
NgxsStoragePluginModule.forRoot({
key: ['prefs', 'layout', 'window'],
storage: StorageOption.LocalStorage
}),
NgxsReduxDevtoolsPluginModule.forRoot({disabled: !window['DEV_MODE']}),
RouterModule.forRoot(ROUTES, { enableTracing: false, useHash: true })
],
providers: [
...SERVICES
]