Skip to content

Commit 60d4dc5

Browse files
aimxnaimCopilot
andauthored
Update 07-directives-deep-dive/01-starting-project/src/app/directives/log.directive.spec.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7b6487d commit 60d4dc5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import { ElementRef } from '@angular/core';
12
import { LogDirective } from './log.directive';
23

34
describe('LogDirective', () => {
45
it('should create an instance', () => {
5-
const directive = new LogDirective();
6+
const mockElementRef: ElementRef = { nativeElement: document.createElement('div') };
7+
const directive = new LogDirective(mockElementRef);
68
expect(directive).toBeTruthy();
79
});
810
});

0 commit comments

Comments
 (0)