Skip to content

Commit

Permalink
feat: support signal queries in Angular 17.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Anh Pham authored and ahnpnl committed Feb 16, 2024
1 parent 1375c2d commit a57ad7d
Showing 1 changed file with 18 additions and 0 deletions.
@@ -0,0 +1,18 @@
import { Component, ElementRef, viewChild } from '@angular/core';
import { TestBed } from '@angular/core/testing';

test('signal queries', () => {
@Component({
selector: 'greet',
standalone: true,
template: '<input #el>',
})
class GreetCmp {
input = viewChild.required<ElementRef>('el');
}

const fixture = TestBed.createComponent(GreetCmp);
fixture.detectChanges();

expect(fixture.componentInstance.input()).toBeDefined();
});

0 comments on commit a57ad7d

Please sign in to comment.