From 1507b8c9843262d6514ed61fdba115671dfb7bfe Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 8 Dec 2021 19:12:14 -0500 Subject: fix: upgrade swc fixing many bundling and `--no-check` bugs (#13025) --- cli/tests/integration/repl_tests.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'cli/tests/integration/repl_tests.rs') diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index 3dd5699c6..18e022cfe 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -63,12 +63,14 @@ fn pty_bad_input() { fn pty_syntax_error_input() { util::with_pty(&["repl"], |mut console| { console.write_line("('\\u')"); - console.write_line("('"); + console.write_line("'"); + console.write_line("[{'a'}];"); console.write_line("close();"); let output = console.read_all_output(); + assert!(output.contains("Expected 4 hex characters")); assert!(output.contains("Unterminated string constant")); - assert!(output.contains("Unexpected eof")); + assert!(output.contains("Expected a semicolon")); }); } @@ -267,7 +269,11 @@ fn typescript_declarations() { Some(vec![("NO_COLOR".to_owned(), "1".to_owned())]), false, ); - assert!(out.ends_with("undefined\n0\n2\nundefined\nundefined\n")); + let expected_end_text = "undefined\n0\n2\nundefined\nundefined\n"; + assert_eq!( + &out[out.len() - expected_end_text.len()..], + expected_end_text + ); assert!(err.is_empty()); } -- cgit v1.2.3