File tree 1 file changed +4
-8
lines changed
packages/angular_devkit/build_angular/src/browser/specs
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -113,10 +113,8 @@ describe('Browser Builder assets', () => {
113
113
} ;
114
114
115
115
const run = await architect . scheduleTarget ( targetSpec , overrides ) ;
116
- try {
117
- await run . result ;
118
- expect ( 'THE ABOVE LINE SHOULD THROW' ) . toBe ( '' ) ;
119
- } catch { }
116
+
117
+ await expectAsync ( run . result ) . toBeRejected ( ) ;
120
118
121
119
// The node_modules folder must be deleted, otherwise code that tries to find the
122
120
// node_modules folder will hit this one and can fail.
@@ -135,10 +133,8 @@ describe('Browser Builder assets', () => {
135
133
} ;
136
134
137
135
const run = await architect . scheduleTarget ( targetSpec , overrides ) ;
138
- try {
139
- await run . result ;
140
- expect ( 'THE ABOVE LINE SHOULD THROW' ) . toBe ( '' ) ;
141
- } catch { }
136
+
137
+ await expectAsync ( run . result ) . toBeRejected ( ) ;
142
138
143
139
// The node_modules folder must be deleted, otherwise code that tries to find the
144
140
// node_modules folder will hit this one and can fail.
You can’t perform that action at this time.
0 commit comments