11import { Component , input , output , inputBinding , outputBinding , twoWayBinding , signal , model } from '@angular/core' ;
22import { render , screen , aliasedInput } from '../src/public_api' ;
33
4- describe ( 'ATL Bindings API Support' , ( ) => {
4+ describe ( 'Bindings API Support' , ( ) => {
55 @Component ( {
66 selector : 'atl-bindings-test' ,
77 template : `
@@ -34,7 +34,7 @@ describe('ATL Bindings API Support', () => {
3434 }
3535 }
3636
37- it ( 'should support inputBinding for regular inputs' , async ( ) => {
37+ it ( 'supports inputBinding for regular inputs' , async ( ) => {
3838 await render ( BindingsTestComponent , {
3939 bindings : [ inputBinding ( 'value' , ( ) => 'test-value' ) , inputBinding ( 'greet' , ( ) => 'hi there' ) ] ,
4040 } ) ;
@@ -43,7 +43,7 @@ describe('ATL Bindings API Support', () => {
4343 expect ( screen . getByTestId ( 'greeting' ) ) . toHaveTextContent ( 'hi there' ) ;
4444 } ) ;
4545
46- it ( 'should support outputBinding for outputs' , async ( ) => {
46+ it ( 'supports outputBinding for outputs' , async ( ) => {
4747 const clickHandler = jest . fn ( ) ;
4848
4949 await render ( BindingsTestComponent , {
@@ -56,7 +56,7 @@ describe('ATL Bindings API Support', () => {
5656 expect ( clickHandler ) . toHaveBeenCalledWith ( 'clicked: bound-value' ) ;
5757 } ) ;
5858
59- it ( 'should support inputBinding with writable signal for re-rendering scenario' , async ( ) => {
59+ it ( 'supports inputBinding with writable signal for re-rendering scenario' , async ( ) => {
6060 const valueSignal = signal ( 'initial-value' ) ;
6161
6262 await render ( BindingsTestComponent , {
@@ -73,7 +73,7 @@ describe('ATL Bindings API Support', () => {
7373 expect ( await screen . findByText ( 'updated-value' ) ) . toBeInTheDocument ( ) ;
7474 } ) ;
7575
76- it ( 'should support twoWayBinding for model signals' , async ( ) => {
76+ it ( 'supports twoWayBinding for model signals' , async ( ) => {
7777 const nameSignal = signal ( 'initial name' ) ;
7878
7979 await render ( TwoWayBindingTestComponent , {
@@ -99,7 +99,7 @@ describe('ATL Bindings API Support', () => {
9999 expect ( nameSignal ( ) ) . toBe ( 'updated from component' ) ;
100100 } ) ;
101101
102- it ( 'should warn when mixing bindings with traditional inputs but still work ' , async ( ) => {
102+ it ( 'warns when mixing bindings with traditional inputs but still works ' , async ( ) => {
103103 const consoleSpy = jest . spyOn ( console , 'warn' ) . mockImplementation ( ) ;
104104 const clickHandler = jest . fn ( ) ;
105105 const bindingClickHandler = jest . fn ( ) ;
@@ -121,19 +121,18 @@ describe('ATL Bindings API Support', () => {
121121 const button = screen . getByTestId ( 'emit-button' ) ;
122122 button . click ( ) ;
123123
124- // Both binding and traditional handlers should be called for outputs
124+ // Both binding and traditional handlers are called for outputs
125125 expect ( bindingClickHandler ) . toHaveBeenCalledWith ( 'clicked: binding-value' ) ;
126126 expect ( clickHandler ) . toHaveBeenCalledWith ( 'clicked: binding-value' ) ;
127127
128- // Should show warning about mixed usage for inputs
128+ // Shows warning about mixed usage for inputs
129129 expect ( consoleSpy ) . toHaveBeenCalledWith (
130- 'ATL: You specified both bindings and traditional inputs. ' +
131- 'Angular does not allow mixing setInput() with inputBinding(). ' +
130+ '[@testing-library/angular]: You specified both bindings and traditional inputs. ' +
132131 'Only bindings will be used for inputs. Use bindings for all inputs to avoid this warning.' ,
133132 ) ;
134133
135134 expect ( consoleSpy ) . toHaveBeenCalledWith (
136- 'ATL : You specified both bindings and traditional output listeners. ' +
135+ '[@testing-library/angular] : You specified both bindings and traditional output listeners. ' +
137136 'Consider using outputBinding() for all outputs for consistency.' ,
138137 ) ;
139138
0 commit comments