Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Snehil Shah <snehilshah.989@gmail.com>
  • Loading branch information
Snehil-Shah committed Mar 31, 2024
1 parent 2f53984 commit a1477a3
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ function spliced2expected( s ) {
function defaultSettings() {
return {
'autoClosePairs': false,
'autoDeletePairs': false,
'completionPreviews': false
};
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -416,13 +415,11 @@ function assertNoAutoDelete( 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();
Expand Down

0 comments on commit a1477a3

Please # to comment.