Skip to content

Commit

Permalink
simplify ngrx effect registration (#4008)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika authored Aug 6, 2024
1 parent 70de07f commit 2d5b9ea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 40 deletions.
7 changes: 4 additions & 3 deletions projects/aca-content/src/lib/store/app-store.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { StoreModule } from '@ngrx/store';
import { appReducer } from './reducers/app.reducer';
import { StoreRouterConnectingModule, FullRouterStateSerializer } from '@ngrx/router-store';
import { EffectsModule } from '@ngrx/effects';
import { SharedStoreModule } from '@alfresco/aca-shared/store';
import { RouterEffects, SnackbarEffects } from '@alfresco/aca-shared/store';
import {
AppEffects,
NodeEffects,
Expand Down Expand Up @@ -58,7 +58,6 @@ import { INITIAL_STATE } from './initial-state';
serializer: FullRouterStateSerializer,
stateKey: 'router'
}),
SharedStoreModule,
EffectsModule.forRoot([
AppEffects,
NodeEffects,
Expand All @@ -69,7 +68,9 @@ import { INITIAL_STATE } from './initial-state';
UploadEffects,
FavoriteEffects,
TemplateEffects,
ContextMenuEffects
ContextMenuEffects,
SnackbarEffects,
RouterEffects
])
]
})
Expand Down
10 changes: 8 additions & 2 deletions projects/aca-content/src/lib/store/effects/node.effects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ import {
PrintFileAction,
PurgeDeletedNodesAction,
RestoreDeletedNodesAction,
RouterEffects,
SetCurrentFolderAction,
SetInfoDrawerStateAction,
SetSelectedNodesAction,
SharedStoreModule,
ShareNodeAction,
ShowLoaderAction,
SnackbarEffects,
UndoDeleteNodesAction,
UnlockWriteAction,
UnshareNodesAction
Expand All @@ -67,7 +68,12 @@ describe('NodeEffects', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [AppTestingModule, SharedStoreModule, EffectsModule.forRoot([NodeEffects, ViewerEffects]), MatDialogModule, MatSnackBarModule],
imports: [
AppTestingModule,
EffectsModule.forRoot([NodeEffects, ViewerEffects, SnackbarEffects, RouterEffects]),
MatDialogModule,
MatSnackBarModule
],
providers: [RenditionService]
});

Expand Down
2 changes: 0 additions & 2 deletions projects/aca-shared/store/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,3 @@ export * from './models/modal-configuration';
export * from './selectors/app.selectors';

export * from './states/app.state';

export * from './store.module';
33 changes: 0 additions & 33 deletions projects/aca-shared/store/src/store.module.ts

This file was deleted.

0 comments on commit 2d5b9ea

Please sign in to comment.