Skip to content

Commit a1477a3

Browse files
committed
test: fix tests
Signed-off-by: Snehil Shah <[email protected]>
1 parent 2f53984 commit a1477a3

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

lib/node_modules/@stdlib/repl/test/integration/test.auto_close_pairs.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ function spliced2expected( s ) {
148148
function defaultSettings() {
149149
return {
150150
'autoClosePairs': false,
151+
'autoDeletePairs': false,
151152
'completionPreviews': false
152153
};
153154
}
@@ -342,13 +343,11 @@ function assertAutoDelete( t, fixture, done ) {
342343
N = fixture.expression.length - fixture.cursor;
343344
moveBack( istream, N );
344345

345-
// Enable auto-close:
346-
r.settings( 'autoClosePairs', true );
346+
// Enable auto-delete:
347+
r.settings( 'autoDeletePairs', true );
347348

348349
// Delete the character in order to trigger auto-delete:
349-
r._rli.write( null, { // eslint-disable-line no-underscore-dangle
350-
'name': 'backspace'
351-
});
350+
istream.write( '\x08' );
352351

353352
// Close the input stream:
354353
istream.end();
@@ -416,13 +415,11 @@ function assertNoAutoDelete( t, fixture, done ) {
416415
N = fixture.expression.length - fixture.cursor;
417416
moveBack( istream, N );
418417

419-
// Enable auto-close:
420-
r.settings( 'autoClosePairs', true );
418+
// Enable auto-delete:
419+
r.settings( 'autoDeletePairs', true );
421420

422421
// Delete the character in order to trigger auto-delete:
423-
r._rli.write( null, { // eslint-disable-line no-underscore-dangle
424-
'name': 'backspace'
425-
});
422+
istream.write( '\x08' );
426423

427424
// Close the input stream:
428425
istream.end();

0 commit comments

Comments
 (0)