diff options
-rw-r--r-- | cli/tests/integration/repl_tests.rs | 16 | ||||
-rw-r--r-- | cli/tools/repl/editor.rs | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index 52510a637..f7bd627c3 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -1057,3 +1057,19 @@ fn npm_packages() { assert!(err.is_empty()); } } + +#[test] +fn pty_tab_indexable_props() { + util::with_pty(&["repl"], |mut console| { + console.write_line("const arr = [1, 2, 3]"); + console.write_line("arr.\t\t"); + console.write_line("close();"); + + let output = console.read_all_output(); + println!("output"); + assert_contains!(output, "constructor"); + assert_contains!(output, "sort"); + assert_contains!(output, "at"); + assert_not_contains!(output, "0", "1", "2"); + }); +} diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs index e1cda21e1..e12b9314b 100644 --- a/cli/tools/repl/editor.rs +++ b/cli/tools/repl/editor.rs @@ -109,7 +109,7 @@ impl EditorHelper { own_properties: None, accessor_properties_only: None, generate_preview: None, - non_indexed_properties_only: None, + non_indexed_properties_only: Some(true), }), ) .ok()?; |