@@ -5,6 +5,7 @@ module.exports = class BaseLogger {
55 this . testingStarted = false ;
66 this . aborted = false ;
77 this . running = false ;
8+ this . watching = true ;
89
910 process . stdout . write = ( ...args ) => this . _onStdoutWrite ( ...args ) ;
1011
@@ -21,15 +22,16 @@ You can use the following keys in the terminal:
2122
2223` ,
2324
24- sourceChanged : 'Sources have been changed. Test run is starting...' ,
25- testRunStarting : 'Test run is starting...' ,
26- testRunStarted : 'Test run in progress...' ,
27- testRunStopping : 'Current test run is stopping...' ,
28- testRunFinished : 'Make changes in the source files or press ctrl+r to restart test run.' ,
29- fileWatchingEnabled : 'File watching enabled. Save changes in your files to run tests.' ,
30- fileWatchingDisabled : 'File watching disabled.' ,
31- nothingToStop : 'There are no tests running at the moment.' ,
32- testCafeStopping : 'Stopping TestCafe Live...'
25+ sourceChanged : 'Sources have been changed. Test run is starting...' ,
26+ testRunStarting : 'Test run is starting...' ,
27+ testRunStarted : 'Test run in progress...' ,
28+ testRunStopping : 'Current test run is stopping...' ,
29+ testRunFinishedWatching : 'Make changes in the source files or press ctrl+r to restart test run.' ,
30+ testRunFinishedNotWatching : 'Press ctrl+r to restart test run.' ,
31+ fileWatchingEnabled : 'File watching enabled. Save changes in your files to run tests.' ,
32+ fileWatchingDisabled : 'File watching disabled.' ,
33+ nothingToStop : 'There are no tests running at the moment.' ,
34+ testCafeStopping : 'Stopping TestCafe Live...'
3335 } ;
3436 }
3537
@@ -72,7 +74,7 @@ You can use the following keys in the terminal:
7274 testsFinished ( ) {
7375 this . running = false ;
7476
75- this . _status ( this . MESSAGES . testRunFinished ) ;
77+ this . _status ( this . watching ? this . MESSAGES . testRunFinishedWatching : this . MESSAGES . testRunFinishedNotWatching ) ;
7678 }
7779
7880 stopRunning ( ) {
@@ -84,6 +86,8 @@ You can use the following keys in the terminal:
8486 }
8587
8688 toggleWatching ( enable ) {
89+ this . watching = enable ;
90+
8791 if ( enable )
8892 this . _status ( this . MESSAGES . fileWatchingEnabled ) ;
8993 else
0 commit comments