Skip to content

Commit

Permalink
fix: fixing test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
MeastroZI committed Dec 27, 2024
1 parent 8d80cee commit 4a9205b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 8 additions & 1 deletion lib/node_modules/@stdlib/repl/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,14 @@ function REPL( options ) {
opts.settings.completionPreviews = ( opts.settings.completionPreviews === void 0 ) ? opts.isTTY : opts.settings.completionPreviews; // eslint-disable-line max-len
opts.settings.autoDisableBracketedPasteOnExit = ( opts.settings.autoDisableBracketedPasteOnExit === void 0 ) ? opts.isTTY : opts.settings.autoDisableBracketedPasteOnExit; // eslint-disable-line max-len
opts.settings.syntaxHighlighting = ( opts.settings.syntaxHighlighting === void 0 ) ? opts.isTTY : opts.settings.syntaxHighlighting; // eslint-disable-line max-len
opts.settings.eagerEvaluation = ( opts.settings.eagerEvaluation === void 0 ) ? opts.isTTY : opts.settings.eagerEvaluation; // eslint-disable-line max-len

// This is temparary because eager evaluation conflicting with the auto_close_pairs tests.
if ( options && options.settings.eagerEvaluation !== void 0 ) {
opts.settings.eagerEvaluation = options.settings.eagerEvaluation;
}
else {
opts.settings.eagerEvaluation = ( opts.settings.eagerEvaluation === void 0 ) ? opts.isTTY : opts.settings.eagerEvaluation; // eslint-disable-line max-len
}

debug( 'Options: %s', JSON.stringify({
'input': '<readable_stream>',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ function defaultSettings() {
'autoDeletePairs': false,
'autoPage': false,
'completionPreviews': false,
'syntaxHighlighting': false
'syntaxHighlighting': false,
'eagerEvaluation' : false
};
}

Expand Down Expand Up @@ -194,12 +195,12 @@ function assertAutoClose( t, fixture, done ) {

// Create an incomplete expression:
s = splice( fixture.expression, fixture.cursor );

// Construct the expected output:
expected = spliced2expected( s );

// Emulate the presence of an existing expression:
istream.write( s[ 0 ] );
console.log(`here is the s ${s} and here is the expected ${expected}`)

// Move the cursor to where we want to insert a character to trigger auto-close:
N = s[ 0 ].length - fixture.cursor;
Expand Down

0 comments on commit 4a9205b

Please sign in to comment.