Skip to content

test: fix failing tests in the REPL #2516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function defaultSettings() {
return {
'autoDeletePairs': false,
'autoClosePairs': false,
'autoDisableBracketedPasteOnExit': false,
'completionPreviews': false,
'syntaxHighlighting': false,
'autoPage': true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
return {
'autoDeletePairs': false,
'autoClosePairs': false,
'autoDisableBracketedPasteOnExit': false,
'completionPreviews': false,
'syntaxHighlighting': false,
'autoPage': false
Expand Down Expand Up @@ -197,7 +198,7 @@
// Check if the completions were cleared:
t.strictEqual( data[ data.length - 2 ], '\x1B[0J', 'returns expected value' );

// NOTE: `data[ data.length-1 ]` adds the remaining string to the right of the cursor because of the abnormal behaviour of `clearScreenDown`...

Check warning on line 201 in lib/node_modules/@stdlib/repl/test/integration/test.completer_engine.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "behaviour"

t.end();
}
Expand Down Expand Up @@ -343,7 +344,7 @@

// Current line is cleared and the first completion is inserted:
t.strictEqual( data[ data.length - 7 ], '\x1B[0K', 'returns expected value' );
t.strictEqual( data[ data.length - 6 ], 'var zzzab = 1;var zzzxy = 2;zzzab', 'returns expected value' );

Check warning on line 347 in lib/node_modules/@stdlib/repl/test/integration/test.completer_engine.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "zzzab"

// Check for completions after `right` arrow key:
actual = extractCompletions( data[ data.length - 5 ] );
Expand Down Expand Up @@ -433,7 +434,7 @@
r = repl( opts, onClose );

// Declare an object with properties having a common prefix:
istream.write( 'var a = { "zzzxy": 4, "zzzab": 6 };\n' );

Check warning on line 437 in lib/node_modules/@stdlib/repl/test/integration/test.completer_engine.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "zzzab"

// Write the common beginning of the property names in order to generate TAB completions:
istream.write( 'a.zzz' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ tape( 'a REPL instance supports displaying a completion preview of user-defined
'input': istream,
'settings': {
'autoPage': false,
'syntaxHighlighting': false
'syntaxHighlighting': false,
'autoDisableBracketedPasteOnExit': false
}
};
r = repl( opts, onClose );
Expand Down Expand Up @@ -90,7 +91,8 @@ tape( 'a REPL instance supports displaying a completion preview for common prefi
'input': istream,
'settings': {
'autoPage': false,
'syntaxHighlighting': false
'syntaxHighlighting': false,
'autoDisableBracketedPasteOnExit': false
}
};
r = repl( opts, onClose );
Expand Down Expand Up @@ -135,7 +137,8 @@ tape( 'a REPL instance supports displaying a completion preview for recognized i
'input': istream,
'settings': {
'autoPage': false,
'syntaxHighlighting': false
'syntaxHighlighting': false,
'autoDisableBracketedPasteOnExit': false
}
};
r = repl( opts, onClose );
Expand Down Expand Up @@ -179,7 +182,8 @@ tape( 'a REPL instance supports displaying a completion preview when a cursor is
'input': istream,
'settings': {
'autoPage': false,
'syntaxHighlighting': false
'syntaxHighlighting': false,
'autoDisableBracketedPasteOnExit': false
}
};
r = repl( opts, onClose );
Expand Down Expand Up @@ -232,7 +236,8 @@ tape( 'a REPL instance supports auto-completing a completion candidate by moving
'input': istream,
'settings': {
'autoPage': false,
'syntaxHighlighting': false
'syntaxHighlighting': false,
'autoDisableBracketedPasteOnExit': false
}
};
r = repl( opts, onClose );
Expand Down Expand Up @@ -284,7 +289,8 @@ tape( 'a REPL instance supports auto-completing a completion preview and executi
'outputPrompt': '',
'settings': {
'autoPage': false,
'syntaxHighlighting': false
'syntaxHighlighting': false,
'autoDisableBracketedPasteOnExit': false
}
};
r = repl( opts, onClose );
Expand Down Expand Up @@ -337,7 +343,8 @@ tape( 'a REPL instance does not display a completion preview when no completion
'input': istream,
'settings': {
'autoPage': false,
'syntaxHighlighting': false
'syntaxHighlighting': false,
'autoDisableBracketedPasteOnExit': false
}
};
r = repl( opts, onClose );
Expand Down Expand Up @@ -395,7 +402,8 @@ tape( 'a REPL instance does not display a completion preview once a user enters
'outputPrompt': '',
'settings': {
'autoPage': false,
'syntaxHighlighting': false
'syntaxHighlighting': false,
'autoDisableBracketedPasteOnExit': false
}
};
r = repl( opts, onClose );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function defaultSettings() {
return {
'autoClosePairs': false,
'autoDeletePairs': false,
'autoDisableBracketedPasteOnExit': false,
'autoPage': false,
'completionPreviews': false,
'syntaxHighlighting': true
Expand Down
Loading