-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(component): add separate modules for PushPipe and LetDirective
- Loading branch information
1 parent
34174a7
commit 9167547
Showing
11 changed files
with
108 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { LetModule } from '../../src/let/let.module'; | ||
|
||
describe('LetModule', () => { | ||
let letModule: LetModule; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [LetModule], | ||
}); | ||
|
||
letModule = TestBed.inject(LetModule); | ||
}); | ||
|
||
it('should be initialized', () => { | ||
expect(letModule).toBeDefined(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { PushModule } from '../../src/push/push.module'; | ||
|
||
describe('PushModule', () => { | ||
let pushModule: PushModule; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [PushModule], | ||
}); | ||
|
||
pushModule = TestBed.inject(PushModule); | ||
}); | ||
|
||
it('should be initialized', () => { | ||
expect(pushModule).toBeDefined(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { ReactiveComponentModule } from '../src/reactive-component.module'; | ||
|
||
describe('Component Module', () => { | ||
let componentModule: ReactiveComponentModule; | ||
describe('ReactiveComponentModule', () => { | ||
let reactiveComponentModule: ReactiveComponentModule; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [ReactiveComponentModule], | ||
}); | ||
|
||
componentModule = TestBed.inject(ReactiveComponentModule); | ||
reactiveComponentModule = TestBed.inject(ReactiveComponentModule); | ||
}); | ||
|
||
it('should add all effects when instantiated', () => { | ||
expect(componentModule).toBeDefined(); | ||
it('should be initialized', () => { | ||
expect(reactiveComponentModule).toBeDefined(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export { PushPipe } from './push/push.pipe'; | ||
export { LetDirective } from './let/let.directive'; | ||
export { LetModule } from './let/let.module'; | ||
export { PushPipe } from './push/push.pipe'; | ||
export { PushModule } from './push/push.module'; | ||
export { ReactiveComponentModule } from './reactive-component.module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { LetDirective } from './let.directive'; | ||
|
||
@NgModule({ | ||
declarations: [LetDirective], | ||
exports: [LetDirective], | ||
}) | ||
export class LetModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { PushPipe } from './push.pipe'; | ||
|
||
@NgModule({ | ||
declarations: [PushPipe], | ||
exports: [PushPipe], | ||
}) | ||
export class PushModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { LetDirective } from './let/let.directive'; | ||
import { PushPipe } from './push/push.pipe'; | ||
|
||
const DECLARATIONS = [LetDirective, PushPipe]; | ||
const EXPORTS = [DECLARATIONS]; | ||
import { LetModule } from './let/let.module'; | ||
import { PushModule } from './push/push.module'; | ||
|
||
@NgModule({ | ||
declarations: [DECLARATIONS], | ||
exports: [EXPORTS], | ||
exports: [LetModule, PushModule], | ||
}) | ||
export class ReactiveComponentModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters