Skip to content

Commit 4a9205b

Browse files
committed
fix: fixing test failure
1 parent 8d80cee commit 4a9205b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

lib/node_modules/@stdlib/repl/lib/main.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,14 @@ function REPL( options ) {
160160
opts.settings.completionPreviews = ( opts.settings.completionPreviews === void 0 ) ? opts.isTTY : opts.settings.completionPreviews; // eslint-disable-line max-len
161161
opts.settings.autoDisableBracketedPasteOnExit = ( opts.settings.autoDisableBracketedPasteOnExit === void 0 ) ? opts.isTTY : opts.settings.autoDisableBracketedPasteOnExit; // eslint-disable-line max-len
162162
opts.settings.syntaxHighlighting = ( opts.settings.syntaxHighlighting === void 0 ) ? opts.isTTY : opts.settings.syntaxHighlighting; // eslint-disable-line max-len
163-
opts.settings.eagerEvaluation = ( opts.settings.eagerEvaluation === void 0 ) ? opts.isTTY : opts.settings.eagerEvaluation; // eslint-disable-line max-len
163+
164+
// This is temparary because eager evaluation conflicting with the auto_close_pairs tests.
165+
if ( options && options.settings.eagerEvaluation !== void 0 ) {
166+
opts.settings.eagerEvaluation = options.settings.eagerEvaluation;
167+
}
168+
else {
169+
opts.settings.eagerEvaluation = ( opts.settings.eagerEvaluation === void 0 ) ? opts.isTTY : opts.settings.eagerEvaluation; // eslint-disable-line max-len
170+
}
164171

165172
debug( 'Options: %s', JSON.stringify({
166173
'input': '<readable_stream>',

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ function defaultSettings() {
145145
'autoDeletePairs': false,
146146
'autoPage': false,
147147
'completionPreviews': false,
148-
'syntaxHighlighting': false
148+
'syntaxHighlighting': false,
149+
'eagerEvaluation' : false
149150
};
150151
}
151152

@@ -194,12 +195,12 @@ function assertAutoClose( t, fixture, done ) {
194195

195196
// Create an incomplete expression:
196197
s = splice( fixture.expression, fixture.cursor );
197-
198198
// Construct the expected output:
199199
expected = spliced2expected( s );
200200

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

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

0 commit comments

Comments
 (0)