Skip to content

Commit 9695c8a

Browse files
committed
Fix tests
1 parent 9d9c7d3 commit 9695c8a

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

crates/turborepo-lib/src/run/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ impl Run {
212212
}
213213

214214
pub fn start_ui(&self) -> UIResult<UISender> {
215+
// Print prelude here as this needs to happen before the UI is started
216+
if self.should_print_prelude {
217+
self.print_run_prelude();
218+
}
219+
215220
match self.opts.run_opts.ui_mode {
216221
UIMode::Tui => self
217222
.start_terminal_ui()
@@ -222,7 +227,7 @@ impl Run {
222227
.map(|res| res.map(|(sender, handle)| (UISender::Wui(sender), handle))),
223228
}
224229
}
225-
pub fn start_web_ui(&self) -> WuiResult {
230+
fn start_web_ui(&self) -> WuiResult {
226231
let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
227232

228233
let handle = tokio::spawn(turborepo_ui::wui::server::start_server(rx));
@@ -231,12 +236,7 @@ impl Run {
231236
}
232237

233238
#[allow(clippy::type_complexity)]
234-
pub fn start_terminal_ui(&self) -> TuiResult {
235-
// Print prelude here as this needs to happen before the UI is started
236-
if self.should_print_prelude {
237-
self.print_run_prelude();
238-
}
239-
239+
fn start_terminal_ui(&self) -> TuiResult {
240240
if !self.should_start_ui()? {
241241
return Ok(None);
242242
}

turborepo-tests/integration/tests/no-args.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Make sure exit code is 2 when no args are passed
3939
--heap <HEAP>
4040
Specify a file to save a pprof heap profile
4141
--ui <UI>
42-
Specify whether to use the streaming UI or TUI [possible values: tui, stream]
42+
Specify whether to use the streaming UI or TUI [possible values: tui, stream, web]
4343
--login <LOGIN>
4444
Override the login endpoint
4545
--no-color

turborepo-tests/integration/tests/turbo-help.t

+6-5
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Test help flag
3939
--heap <HEAP>
4040
Specify a file to save a pprof heap profile
4141
--ui <UI>
42-
Specify whether to use the streaming UI or TUI [possible values: tui, stream]
42+
Specify whether to use the streaming UI or TUI [possible values: tui, stream, web]
4343
--login <LOGIN>
4444
Override the login endpoint
4545
--no-color
@@ -171,6 +171,7 @@ Test help flag
171171
Possible values:
172172
- tui: Use the terminal user interface
173173
- stream: Use the standard output stream
174+
- web: Use the web user interface (experimental)
174175

175176
--login <LOGIN>
176177
Override the login endpoint
@@ -344,7 +345,7 @@ Test help flag for link command
344345
--heap <HEAP>
345346
Specify a file to save a pprof heap profile
346347
--ui <UI>
347-
Specify whether to use the streaming UI or TUI [possible values: tui, stream]
348+
Specify whether to use the streaming UI or TUI [possible values: tui, stream, web]
348349
--login <LOGIN>
349350
Override the login endpoint
350351
--no-color
@@ -392,7 +393,7 @@ Test help flag for unlink command
392393
--heap <HEAP>
393394
Specify a file to save a pprof heap profile
394395
--ui <UI>
395-
Specify whether to use the streaming UI or TUI [possible values: tui, stream]
396+
Specify whether to use the streaming UI or TUI [possible values: tui, stream, web]
396397
--login <LOGIN>
397398
Override the login endpoint
398399
--no-color
@@ -442,7 +443,7 @@ Test help flag for login command
442443
--heap <HEAP>
443444
Specify a file to save a pprof heap profile
444445
--ui <UI>
445-
Specify whether to use the streaming UI or TUI [possible values: tui, stream]
446+
Specify whether to use the streaming UI or TUI [possible values: tui, stream, web]
446447
--login <LOGIN>
447448
Override the login endpoint
448449
--no-color
@@ -490,7 +491,7 @@ Test help flag for logout command
490491
--heap <HEAP>
491492
Specify a file to save a pprof heap profile
492493
--ui <UI>
493-
Specify whether to use the streaming UI or TUI [possible values: tui, stream]
494+
Specify whether to use the streaming UI or TUI [possible values: tui, stream, web]
494495
--login <LOGIN>
495496
Override the login endpoint
496497
--no-color

0 commit comments

Comments
 (0)