File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed
apps/example-app/src/app/examples Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ import { render , screen } from '@testing-library/angular' ;
2+ import { SignalInputComponent } from './22-signal-inputs.component' ;
3+ import { Component } from '@angular/core' ;
4+
5+ test ( 'works with signal inputs using a wrapper component' , async ( ) => {
6+ @Component ( {
7+ template : `
8+ <app-signal-input [greeting]="greeting" [name]="name"/>
9+ ` ,
10+ standalone : true ,
11+ imports : [ SignalInputComponent ] ,
12+ } )
13+ class WrapperComponent {
14+ greeting = 'Hello' ;
15+ name = 'world' ;
16+ }
17+
18+ await render ( WrapperComponent ) ;
19+
20+ expect ( screen . getByText ( / h e l l o w o r l d / i) ) . toBeInTheDocument ( ) ;
21+ } ) ;
Original file line number Diff line number Diff line change 1+ import { Component , input } from '@angular/core' ;
2+
3+ @Component ( {
4+ selector : 'app-signal-input' ,
5+ template : ` {{ greetings() }} {{ name() }} ` ,
6+ standalone : true ,
7+ } )
8+ export class SignalInputComponent {
9+ greetings = input < string > ( '' , {
10+ alias : 'greeting' ,
11+ } ) ;
12+ name = input . required < string > ( ) ;
13+ }
Original file line number Diff line number Diff line change 8585 "jasmine-spec-reporter" : " 7.0.0" ,
8686 "jest" : " 29.5.0" ,
8787 "jest-environment-jsdom" : " 29.5.0" ,
88- "jest-preset-angular" : " 13.1.6 " ,
88+ "jest-preset-angular" : " 14.0.3 " ,
8989 "karma" : " 6.4.0" ,
9090 "karma-chrome-launcher" : " ^3.1.0" ,
9191 "karma-coverage" : " ^2.2.1" ,
You can’t perform that action at this time.
0 commit comments