-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
4 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
30 changes: 28 additions & 2 deletions
30
projects/cli/schematics/directives/files/disabled/disabled.directive.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 |
---|---|---|
@@ -1,8 +1,34 @@ | ||
import { Component } from '@angular/core'; | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ZenDisabledDirective } from './disabled.directive'; | ||
import { ZenHostDirective } from './index'; | ||
|
||
@Component({ | ||
template: ``, | ||
hostDirectives: [ZenHostDirective], | ||
standalone: true, | ||
}) | ||
class ZenDisabledComponent {} | ||
|
||
describe('ZenDisabledDirective', () => { | ||
it('should create an instance', () => { | ||
const directive = new ZenDisabledDirective(); | ||
let component: ZenDisabledComponent; | ||
let directive: ZenDisabledDirective; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [ZenDisabledComponent], | ||
}).compileComponents(); | ||
|
||
const fixture: ComponentFixture<ZenDisabledComponent> = | ||
TestBed.createComponent(ZenDisabledComponent); | ||
component = fixture.componentInstance; | ||
directive = fixture.debugElement.injector.get(ZenDisabledDirective); | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
expect(directive).toBeTruthy(); | ||
}); | ||
}); |
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