@@ -76,8 +76,8 @@ describe('NgrxPush migration', () => {
76
76
} ) ;
77
77
} ) ;
78
78
79
- describe ( 'importReactiveComponentModule ' , ( ) => {
80
- it ( 'should import ReactiveComponentModule when BrowserModule is imported' , async ( ) => {
79
+ describe ( 'importPushModule ' , ( ) => {
80
+ it ( 'should import PushModule when BrowserModule is imported' , async ( ) => {
81
81
appTree . create (
82
82
'./sut.module.ts' ,
83
83
`
@@ -100,15 +100,11 @@ describe('NgrxPush migration', () => {
100
100
. toPromise ( ) ;
101
101
102
102
const actual = tree . readContent ( './sut.module.ts' ) ;
103
- expect ( actual ) . toMatch (
104
- / i m p o r t s : \[ B r o w s e r M o d u l e , R e a c t i v e C o m p o n e n t M o d u l e \] , /
105
- ) ;
106
- expect ( actual ) . toMatch (
107
- / i m p o r t { R e a c t i v e C o m p o n e n t M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' /
108
- ) ;
103
+ expect ( actual ) . toMatch ( / i m p o r t s : \[ B r o w s e r M o d u l e , P u s h M o d u l e \] , / ) ;
104
+ expect ( actual ) . toMatch ( / i m p o r t { P u s h M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' / ) ;
109
105
} ) ;
110
106
111
- it ( 'should import ReactiveComponentModule when CommonModule is imported' , async ( ) => {
107
+ it ( 'should import PushModule when CommonModule is imported' , async ( ) => {
112
108
appTree . create (
113
109
'./sut.module.ts' ,
114
110
`
@@ -131,15 +127,11 @@ describe('NgrxPush migration', () => {
131
127
. toPromise ( ) ;
132
128
133
129
const actual = tree . readContent ( './sut.module.ts' ) ;
134
- expect ( actual ) . toMatch (
135
- / i m p o r t s : \[ C o m m o n M o d u l e , R e a c t i v e C o m p o n e n t M o d u l e \] , /
136
- ) ;
137
- expect ( actual ) . toMatch (
138
- / i m p o r t { R e a c t i v e C o m p o n e n t M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' /
139
- ) ;
130
+ expect ( actual ) . toMatch ( / i m p o r t s : \[ C o m m o n M o d u l e , P u s h M o d u l e \] , / ) ;
131
+ expect ( actual ) . toMatch ( / i m p o r t { P u s h M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' / ) ;
140
132
} ) ;
141
133
142
- it ( "should not import ReactiveComponentModule when it doesn't need to" , async ( ) => {
134
+ it ( "should not import PushModule when it doesn't need to" , async ( ) => {
143
135
appTree . create (
144
136
'./sut.module.ts' ,
145
137
`
@@ -158,17 +150,15 @@ describe('NgrxPush migration', () => {
158
150
. toPromise ( ) ;
159
151
160
152
const actual = tree . readContent ( './sut.module.ts' ) ;
153
+ expect ( actual ) . not . toMatch ( / i m p o r t s : \[ C o m m o n M o d u l e , P u s h M o d u l e \] , / ) ;
161
154
expect ( actual ) . not . toMatch (
162
- / i m p o r t s : \[ C o m m o n M o d u l e , R e a c t i v e C o m p o n e n t M o d u l e \] , /
163
- ) ;
164
- expect ( actual ) . not . toMatch (
165
- / i m p o r t { R e a c t i v e C o m p o n e n t M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' /
155
+ / i m p o r t { P u s h M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' /
166
156
) ;
167
157
} ) ;
168
158
} ) ;
169
159
170
- describe ( 'exportReactiveComponentModule ' , ( ) => {
171
- it ( 'should export ReactiveComponentModule when BrowserModule is exported' , async ( ) => {
160
+ describe ( 'exportPushModule ' , ( ) => {
161
+ it ( 'should export PushModule when BrowserModule is exported' , async ( ) => {
172
162
appTree . create (
173
163
'./sut.module.ts' ,
174
164
`
@@ -191,15 +181,11 @@ describe('NgrxPush migration', () => {
191
181
. toPromise ( ) ;
192
182
193
183
const actual = tree . readContent ( './sut.module.ts' ) ;
194
- expect ( actual ) . toMatch (
195
- / e x p o r t s : \[ B r o w s e r M o d u l e , R e a c t i v e C o m p o n e n t M o d u l e \] , /
196
- ) ;
197
- expect ( actual ) . toMatch (
198
- / i m p o r t { R e a c t i v e C o m p o n e n t M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' /
199
- ) ;
184
+ expect ( actual ) . toMatch ( / e x p o r t s : \[ B r o w s e r M o d u l e , P u s h M o d u l e \] , / ) ;
185
+ expect ( actual ) . toMatch ( / i m p o r t { P u s h M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' / ) ;
200
186
} ) ;
201
187
202
- it ( 'should export ReactiveComponentModule when CommonModule is exported' , async ( ) => {
188
+ it ( 'should export PushModule when CommonModule is exported' , async ( ) => {
203
189
appTree . create (
204
190
'./sut.module.ts' ,
205
191
`
@@ -222,15 +208,11 @@ describe('NgrxPush migration', () => {
222
208
. toPromise ( ) ;
223
209
224
210
const actual = tree . readContent ( './sut.module.ts' ) ;
225
- expect ( actual ) . toMatch (
226
- / e x p o r t s : \[ C o m m o n M o d u l e , R e a c t i v e C o m p o n e n t M o d u l e \] , /
227
- ) ;
228
- expect ( actual ) . toMatch (
229
- / i m p o r t { R e a c t i v e C o m p o n e n t M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' /
230
- ) ;
211
+ expect ( actual ) . toMatch ( / e x p o r t s : \[ C o m m o n M o d u l e , P u s h M o d u l e \] , / ) ;
212
+ expect ( actual ) . toMatch ( / i m p o r t { P u s h M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' / ) ;
231
213
} ) ;
232
214
233
- it ( "should not export ReactiveComponentModule when it doesn't need to" , async ( ) => {
215
+ it ( "should not export PushModule when it doesn't need to" , async ( ) => {
234
216
appTree . create (
235
217
'./sut.module.ts' ,
236
218
`
@@ -249,11 +231,9 @@ describe('NgrxPush migration', () => {
249
231
. toPromise ( ) ;
250
232
251
233
const actual = tree . readContent ( './sut.module.ts' ) ;
234
+ expect ( actual ) . not . toMatch ( / e x p o r t s : \[ C o m m o n M o d u l e , P u s h M o d u l e \] , / ) ;
252
235
expect ( actual ) . not . toMatch (
253
- / e x p o r t s : \[ C o m m o n M o d u l e , R e a c t i v e C o m p o n e n t M o d u l e \] , /
254
- ) ;
255
- expect ( actual ) . not . toMatch (
256
- / i m p o r t { R e a c t i v e C o m p o n e n t M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' /
236
+ / i m p o r t { P u s h M o d u l e } f r o m ' @ n g r x \/ c o m p o n e n t ' /
257
237
) ;
258
238
} ) ;
259
239
} ) ;
0 commit comments