-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: declareDirective support (#304)
- Loading branch information
1 parent
26517a4
commit 2032619
Showing
11 changed files
with
87 additions
and
21 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
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
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
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
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
projects/spectator/test/auto-focus/auto-focus.module.spec.ts
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,19 @@ | ||
import { createDirectiveFactory, SpectatorDirective } from '@ngneat/spectator'; | ||
|
||
import { AutoFocusDirective } from './auto-focus.directive'; | ||
import { AutoFocusModule } from './auto-focus.module'; | ||
|
||
describe('AutoFocusDirectiveModule', () => { | ||
let spectator: SpectatorDirective<AutoFocusDirective>; | ||
|
||
const createDirective = createDirectiveFactory({ | ||
directive: AutoFocusDirective, | ||
imports: [AutoFocusModule], | ||
declareDirective: false | ||
}); | ||
|
||
it('should be declare AutoFocusDirective', () => { | ||
spectator = createDirective(`<input [datoAutoFocus]="false"/>`); | ||
expect(spectator.directive).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,11 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { AutoFocusDirective } from './auto-focus.directive'; | ||
|
||
@NgModule({ | ||
imports: [CommonModule], | ||
declarations: [AutoFocusDirective], | ||
exports: [AutoFocusDirective] | ||
}) | ||
export class AutoFocusModule {} |