File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
projects/testing-library/src/tests Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,27 @@ test('overrides output properties', async () => {
114114 expect ( clicked ) . toHaveBeenCalledWith ( 'off' ) ;
115115} ) ;
116116
117+ describe ( 'removeAngularAttributes' , ( ) => {
118+ it ( 'should remove angular attributes' , async ( ) => {
119+ await render ( '<div onOff (clicked)="clicked($event)"></div>' , {
120+ imports : [ OnOffDirective ] ,
121+ removeAngularAttributes : true ,
122+ } ) ;
123+
124+ expect ( document . querySelector ( '[ng-version]' ) ) . toBeNull ( ) ;
125+ expect ( document . querySelector ( '[id]' ) ) . toBeNull ( ) ;
126+ } ) ;
127+
128+ it ( 'is disabled by default' , async ( ) => {
129+ await render ( '<div onOff (clicked)="clicked($event)"></div>' , {
130+ imports : [ OnOffDirective ] ,
131+ } ) ;
132+
133+ expect ( document . querySelector ( '[ng-version]' ) ) . not . toBeNull ( ) ;
134+ expect ( document . querySelector ( '[id]' ) ) . not . toBeNull ( ) ;
135+ } ) ;
136+ } ) ;
137+
117138test ( 'updates properties and invokes change detection' , async ( ) => {
118139 const view = await render < { value : string } > ( '<div [update]="value" ></div>' , {
119140 imports : [ UpdateInputDirective ] ,
You can’t perform that action at this time.
0 commit comments