@@ -45,7 +45,7 @@ class GreetingComponent {
4545
4646test ( 'the directive renders' , async ( ) => {
4747 const view = await render ( '<div onOff></div>' , {
48- declarations : [ OnOffDirective ] ,
48+ imports : [ OnOffDirective ] ,
4949 } ) ;
5050
5151 // eslint-disable-next-line testing-library/no-container
@@ -54,7 +54,7 @@ test('the directive renders', async () => {
5454
5555test ( 'the component renders' , async ( ) => {
5656 const view = await render ( '<greeting name="Angular"></greeting>' , {
57- declarations : [ GreetingComponent ] ,
57+ imports : [ GreetingComponent ] ,
5858 } ) ;
5959
6060 // eslint-disable-next-line testing-library/no-container
@@ -64,7 +64,7 @@ test('the component renders', async () => {
6464
6565test ( 'uses the default props' , async ( ) => {
6666 await render ( '<div onOff></div>' , {
67- declarations : [ OnOffDirective ] ,
67+ imports : [ OnOffDirective ] ,
6868 } ) ;
6969
7070 fireEvent . click ( screen . getByText ( 'init' ) ) ;
@@ -74,7 +74,7 @@ test('uses the default props', async () => {
7474
7575test ( 'overrides input properties' , async ( ) => {
7676 await render ( '<div onOff on="hello"></div>' , {
77- declarations : [ OnOffDirective ] ,
77+ imports : [ OnOffDirective ] ,
7878 } ) ;
7979
8080 fireEvent . click ( screen . getByText ( 'init' ) ) ;
@@ -85,7 +85,7 @@ test('overrides input properties', async () => {
8585test ( 'overrides input properties via a wrapper' , async ( ) => {
8686 // `bar` will be set as a property on the wrapper component, the property will be used to pass to the directive
8787 await render ( '<div onOff [on]="bar"></div>' , {
88- declarations : [ OnOffDirective ] ,
88+ imports : [ OnOffDirective ] ,
8989 componentProperties : {
9090 bar : 'hello' ,
9191 } ,
@@ -100,7 +100,7 @@ test('overrides output properties', async () => {
100100 const clicked = jest . fn ( ) ;
101101
102102 await render ( '<div onOff (clicked)="clicked($event)"></div>' , {
103- declarations : [ OnOffDirective ] ,
103+ imports : [ OnOffDirective ] ,
104104 componentProperties : {
105105 clicked,
106106 } ,
@@ -116,7 +116,7 @@ test('overrides output properties', async () => {
116116describe ( 'removeAngularAttributes' , ( ) => {
117117 it ( 'should remove angular attributes' , async ( ) => {
118118 await render ( '<div onOff (clicked)="clicked($event)"></div>' , {
119- declarations : [ OnOffDirective ] ,
119+ imports : [ OnOffDirective ] ,
120120 removeAngularAttributes : true ,
121121 } ) ;
122122
@@ -126,7 +126,7 @@ describe('removeAngularAttributes', () => {
126126
127127 it ( 'is disabled by default' , async ( ) => {
128128 await render ( '<div onOff (clicked)="clicked($event)"></div>' , {
129- declarations : [ OnOffDirective ] ,
129+ imports : [ OnOffDirective ] ,
130130 } ) ;
131131
132132 expect ( document . querySelector ( '[ng-version]' ) ) . not . toBeNull ( ) ;
@@ -136,7 +136,7 @@ describe('removeAngularAttributes', () => {
136136
137137test ( 'updates properties and invokes change detection' , async ( ) => {
138138 const view = await render < { value : string } > ( '<div [update]="value" ></div>' , {
139- declarations : [ UpdateInputDirective ] ,
139+ imports : [ UpdateInputDirective ] ,
140140 componentProperties : {
141141 value : 'value1' ,
142142 } ,
0 commit comments