@@ -45,7 +45,7 @@ class GreetingComponent {
45
45
46
46
test ( 'the directive renders' , async ( ) => {
47
47
const view = await render ( '<div onOff></div>' , {
48
- declarations : [ OnOffDirective ] ,
48
+ imports : [ OnOffDirective ] ,
49
49
} ) ;
50
50
51
51
// eslint-disable-next-line testing-library/no-container
@@ -54,7 +54,7 @@ test('the directive renders', async () => {
54
54
55
55
test ( 'the component renders' , async ( ) => {
56
56
const view = await render ( '<greeting name="Angular"></greeting>' , {
57
- declarations : [ GreetingComponent ] ,
57
+ imports : [ GreetingComponent ] ,
58
58
} ) ;
59
59
60
60
// eslint-disable-next-line testing-library/no-container
@@ -64,7 +64,7 @@ test('the component renders', async () => {
64
64
65
65
test ( 'uses the default props' , async ( ) => {
66
66
await render ( '<div onOff></div>' , {
67
- declarations : [ OnOffDirective ] ,
67
+ imports : [ OnOffDirective ] ,
68
68
} ) ;
69
69
70
70
fireEvent . click ( screen . getByText ( 'init' ) ) ;
@@ -74,7 +74,7 @@ test('uses the default props', async () => {
74
74
75
75
test ( 'overrides input properties' , async ( ) => {
76
76
await render ( '<div onOff on="hello"></div>' , {
77
- declarations : [ OnOffDirective ] ,
77
+ imports : [ OnOffDirective ] ,
78
78
} ) ;
79
79
80
80
fireEvent . click ( screen . getByText ( 'init' ) ) ;
@@ -85,7 +85,7 @@ test('overrides input properties', async () => {
85
85
test ( 'overrides input properties via a wrapper' , async ( ) => {
86
86
// `bar` will be set as a property on the wrapper component, the property will be used to pass to the directive
87
87
await render ( '<div onOff [on]="bar"></div>' , {
88
- declarations : [ OnOffDirective ] ,
88
+ imports : [ OnOffDirective ] ,
89
89
componentProperties : {
90
90
bar : 'hello' ,
91
91
} ,
@@ -100,7 +100,7 @@ test('overrides output properties', async () => {
100
100
const clicked = jest . fn ( ) ;
101
101
102
102
await render ( '<div onOff (clicked)="clicked($event)"></div>' , {
103
- declarations : [ OnOffDirective ] ,
103
+ imports : [ OnOffDirective ] ,
104
104
componentProperties : {
105
105
clicked,
106
106
} ,
@@ -116,7 +116,7 @@ test('overrides output properties', async () => {
116
116
describe ( 'removeAngularAttributes' , ( ) => {
117
117
it ( 'should remove angular attributes' , async ( ) => {
118
118
await render ( '<div onOff (clicked)="clicked($event)"></div>' , {
119
- declarations : [ OnOffDirective ] ,
119
+ imports : [ OnOffDirective ] ,
120
120
removeAngularAttributes : true ,
121
121
} ) ;
122
122
@@ -126,7 +126,7 @@ describe('removeAngularAttributes', () => {
126
126
127
127
it ( 'is disabled by default' , async ( ) => {
128
128
await render ( '<div onOff (clicked)="clicked($event)"></div>' , {
129
- declarations : [ OnOffDirective ] ,
129
+ imports : [ OnOffDirective ] ,
130
130
} ) ;
131
131
132
132
expect ( document . querySelector ( '[ng-version]' ) ) . not . toBeNull ( ) ;
@@ -136,7 +136,7 @@ describe('removeAngularAttributes', () => {
136
136
137
137
test ( 'updates properties and invokes change detection' , async ( ) => {
138
138
const view = await render < { value : string } > ( '<div [update]="value" ></div>' , {
139
- declarations : [ UpdateInputDirective ] ,
139
+ imports : [ UpdateInputDirective ] ,
140
140
componentProperties : {
141
141
value : 'value1' ,
142
142
} ,
0 commit comments