From 5d162301e3e26fc5f45cb0f162b3efc4a5ebb6be Mon Sep 17 00:00:00 2001 From: Snehil Shah Date: Sun, 31 Mar 2024 21:17:11 +0000 Subject: [PATCH] test: fix tests Signed-off-by: Snehil Shah --- .../test/integration/test.auto_close_pairs.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/node_modules/@stdlib/repl/test/integration/test.auto_close_pairs.js b/lib/node_modules/@stdlib/repl/test/integration/test.auto_close_pairs.js index 4c96638c4808..3eea901d5d26 100644 --- a/lib/node_modules/@stdlib/repl/test/integration/test.auto_close_pairs.js +++ b/lib/node_modules/@stdlib/repl/test/integration/test.auto_close_pairs.js @@ -148,6 +148,7 @@ function spliced2expected( s ) { function defaultSettings() { return { 'autoClosePairs': false, + 'autoDeletePairs': false, 'completionPreviews': false }; } @@ -342,13 +343,11 @@ function assertAutoDelete( t, fixture, done ) { N = fixture.expression.length - fixture.cursor; moveBack( istream, N ); - // Enable auto-close: - r.settings( 'autoClosePairs', true ); + // Enable auto-delete: + r.settings( 'autoDeletePairs', true ); // Delete the character in order to trigger auto-delete: - r._rli.write( null, { // eslint-disable-line no-underscore-dangle - 'name': 'backspace' - }); + istream.write( '\x08' ); // Close the input stream: istream.end(); @@ -417,12 +416,10 @@ function assertNoAutoDelete( t, fixture, done ) { moveBack( istream, N ); // Enable auto-close: - r.settings( 'autoClosePairs', true ); + r.settings( 'autoDeletePairs', true ); // Delete the character in order to trigger auto-delete: - r._rli.write( null, { // eslint-disable-line no-underscore-dangle - 'name': 'backspace' - }); + istream.write( '\x08' ); // Close the input stream: istream.end();