File tree Expand file tree Collapse file tree 3 files changed +20
-16
lines changed
Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -193,20 +193,24 @@ async function compile({
193193 initializeResizeListener ( ) ;
194194 }
195195
196- // Testing
197- const ttt = Date . now ( ) ;
198- const testRunner = manager . testRunner ;
199- testRunner . initialize ( ) ;
200- testRunner . findTests ( modules ) ;
201- await testRunner . runTests ( ) ;
202- const aggregatedResults = testRunner . reportResults ( ) ;
203- debug ( `Test Evaluation time: ${ Date . now ( ) - ttt } ms` ) ;
196+ try {
197+ // Testing
198+ const ttt = Date . now ( ) ;
199+ const testRunner = manager . testRunner ;
200+ testRunner . initialize ( ) ;
201+ testRunner . findTests ( modules ) ;
202+ await testRunner . runTests ( ) ;
203+ const aggregatedResults = testRunner . reportResults ( ) ;
204+ debug ( `Test Evaluation time: ${ Date . now ( ) - ttt } ms` ) ;
204205
205- dispatch ( {
206- type : 'test-result' ,
207- result : transformJSON ( aggregatedResults ) ,
208- } ) ;
209- // End - Testing
206+ dispatch ( {
207+ type : 'test-result' ,
208+ result : transformJSON ( aggregatedResults ) ,
209+ } ) ;
210+ // End - Testing
211+ } catch ( e ) {
212+ // Fail silently
213+ }
210214
211215 debug ( `Total time: ${ Date . now ( ) - startTime } ms` ) ;
212216
Original file line number Diff line number Diff line change @@ -273,12 +273,12 @@ export default class Manager {
273273 * Will transpile this module and all eventual children (requires) that go with it
274274 * @param {* } entry
275275 */
276- async transpileModules ( entry : Module ) {
276+ async transpileModules ( entry : Module , isEntry : boolean = true ) {
277277 this . hmrStatus = 'check' ;
278278 this . setEnvironmentVariables ( ) ;
279279 const transpiledModule = this . getTranspiledModule ( entry ) ;
280280
281- transpiledModule . setIsEntry ( true ) ;
281+ transpiledModule . setIsEntry ( isEntry ) ;
282282
283283 const result = await transpiledModule . transpile ( this ) ;
284284 this . getTranspiledModules ( ) . forEach ( t => t . postTranspile ( this ) ) ;
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export default class TestRunner {
9090
9191 async transpileTests ( ) {
9292 for ( let t of this . tests ) {
93- await this . manager . transpileModules ( t ) ;
93+ await this . manager . transpileModules ( t , false ) ;
9494 }
9595 }
9696
You can’t perform that action at this time.
0 commit comments