Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
repl: fixed code style to match guidelines.
Browse files Browse the repository at this point in the history
  • Loading branch information
diosney committed Jun 13, 2015
1 parent 9c73099 commit 266bd4f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/simple/test-repl-tab-complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ var testMe2 = repl.start({
completer: function customCompleter(line, cb) {
var completions = 'aaa aa1 aa2 bbb bb1 bb2 bb3 ccc ddd eee'.split(' ');
var hits = completions.filter(function (item) {
return item.indexOf(line) == 0;
return item.indexOf(line) === 0;
});
// Show all completions if none was found.
cb([hits.length ? hits : completions, line]);
Expand All @@ -230,10 +230,13 @@ var testMe2 = repl.start({

putIn2.run(['.clear']);

// On empty line should output all the custom completions without complete anything.
// On empty line should output all the custom completions
// without complete anything.
putIn2.run(['']);
testMe2.complete('', function(error, data) {
assert.deepEqual(data, ['aaa aa1 aa2 bbb bb1 bb2 bb3 ccc ddd eee'.split(' '), '']);
assert.deepEqual(data, [
'aaa aa1 aa2 bbb bb1 bb2 bb3 ccc ddd eee'.split(' '), ''
]);
});

// On `a` should output `aaa aa1 aa2` and complete until `aa`.
Expand Down

0 comments on commit 266bd4f

Please sign in to comment.