File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,11 @@ module.exports = TestCommand.extend({
51
51
52
52
if ( commandOptions . watch ) {
53
53
return win . checkWindowsElevation ( this . ui )
54
- . then ( function ( ) {
54
+ . then ( _ => {
55
+ // perform initial build to avoid race condition
56
+ return buildTask . run ( buildOptions ) ;
57
+ } , _ => { /* handle build error to allow watch mode to start */ } )
58
+ . then ( _ => {
55
59
return Promise . all ( [
56
60
buildWatchTask . run ( buildOptions ) ,
57
61
testTask . run ( commandOptions )
@@ -61,10 +65,10 @@ module.exports = TestCommand.extend({
61
65
// if not watching ensure karma is doing a single run
62
66
commandOptions . singleRun = true ;
63
67
return win . checkWindowsElevation ( this . ui )
64
- . then ( function ( ) {
68
+ . then ( _ => {
65
69
return buildTask . run ( buildOptions ) ;
66
70
} )
67
- . then ( function ( ) {
71
+ . then ( _ => {
68
72
return testTask . run ( commandOptions ) ;
69
73
} ) ;
70
74
}
You can’t perform that action at this time.
0 commit comments