summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-tab-complete.js
diff options
context:
space:
mode:
authorRoman Reiss <me@silverwind.io>2015-05-19 13:00:06 +0200
committerRoman Reiss <me@silverwind.io>2015-05-19 21:21:27 +0200
commitf29762f4dd5811464684f820286f1c90a694bdff (patch)
tree67ba73a81c3938f41796dfa4c595f9713de59933 /test/parallel/test-repl-tab-complete.js
parent85d99830096a48b7d50cc3b0e5c3fba4172c2d02 (diff)
downloadnode-new-f29762f4dd5811464684f820286f1c90a694bdff.tar.gz
test: enable linting for tests
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/parallel/test-repl-tab-complete.js')
-rw-r--r--test/parallel/test-repl-tab-complete.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js
index c6a07f4017..659c8046a9 100644
--- a/test/parallel/test-repl-tab-complete.js
+++ b/test/parallel/test-repl-tab-complete.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var util = require('util');
@@ -11,7 +12,7 @@ function ArrayStream() {
data.forEach(function(line) {
self.emit('data', line + '\n');
});
- }
+ };
}
util.inherits(ArrayStream, require('stream').Stream);
ArrayStream.prototype.readable = true;
@@ -48,7 +49,7 @@ putIn.run(['.clear']);
// Tab Complete will not break in an ternary operator with ()
putIn.run([
- 'var inner = ( true ' ,
+ 'var inner = ( true ',
'?',
'{one: 1} : '
]);
@@ -60,7 +61,7 @@ putIn.run(['.clear']);
// Tab Complete will return a simple local variable
putIn.run([
- 'var top = function () {',
+ 'var top = function() {',
'var inner = {one:1};'
]);
testMe.complete('inner.o', function(error, data) {
@@ -78,7 +79,7 @@ putIn.run(['.clear']);
// Tab Complete will return a complex local variable
putIn.run([
- 'var top = function () {',
+ 'var top = function() {',
'var inner = {',
' one:1',
'};'
@@ -92,7 +93,7 @@ putIn.run(['.clear']);
// Tab Complete will return a complex local variable even if the function
// has parameters
putIn.run([
- 'var top = function (one, two) {',
+ 'var top = function(one, two) {',
'var inner = {',
' one:1',
'};'
@@ -106,7 +107,7 @@ putIn.run(['.clear']);
// Tab Complete will return a complex local variable even if the
// scope is nested inside an immediately executed function
putIn.run([
- 'var top = function () {',
+ 'var top = function() {',
'(function test () {',
'var inner = {',
' one:1',
@@ -121,7 +122,7 @@ putIn.run(['.clear']);
// currently does not work, but should not break note the inner function
// def has the params and { on a separate line
putIn.run([
- 'var top = function () {',
+ 'var top = function() {',
'r = function test (',
' one, two) {',
'var inner = {',
@@ -136,7 +137,7 @@ putIn.run(['.clear']);
// currently does not work, but should not break, not the {
putIn.run([
- 'var top = function () {',
+ 'var top = function() {',
'r = function test ()',
'{',
'var inner = {',
@@ -151,7 +152,7 @@ putIn.run(['.clear']);
// currently does not work, but should not break
putIn.run([
- 'var top = function () {',
+ 'var top = function() {',
'r = function test (',
')',
'{',
@@ -181,7 +182,7 @@ var spaceTimeout = setTimeout(function() {
}, 1000);
testMe.complete(' ', function(error, data) {
- assert.deepEqual(data, [[],undefined]);
+ assert.deepEqual(data, [[], undefined]);
clearTimeout(spaceTimeout);
});