We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b6487d commit 60d4dc5Copy full SHA for 60d4dc5
07-directives-deep-dive/01-starting-project/src/app/directives/log.directive.spec.ts
@@ -1,8 +1,10 @@
1
+import { ElementRef } from '@angular/core';
2
import { LogDirective } from './log.directive';
3
4
describe('LogDirective', () => {
5
it('should create an instance', () => {
- const directive = new LogDirective();
6
+ const mockElementRef: ElementRef = { nativeElement: document.createElement('div') };
7
+ const directive = new LogDirective(mockElementRef);
8
expect(directive).toBeTruthy();
9
});
10
0 commit comments