From b8c8c3bd6b3b72ddb3c8ad66807e909828cef5cb Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Sat, 12 Sep 2015 03:37:47 +0200 Subject: [PATCH 1/2] tools: enable no-unused-vars linter rule --- .eslintrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc b/.eslintrc index 0bf34c83908c72..1d1cb92781afbe 100644 --- a/.eslintrc +++ b/.eslintrc @@ -78,6 +78,8 @@ rules: # list: https://github.com/eslint/eslint/tree/master/docs/rules#variables ## disallow use of undefined variables (globals) no-undef: 2 + ## disallow unused variables + no-unused-vars: [2, {vars: "all", args: "none"}] # Custom rules in tools/eslint-rules require-buffer: 2 From baa04d43d84c624c5403c06e52751dcc3a153426 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Sat, 12 Sep 2015 03:38:47 +0200 Subject: [PATCH 2/2] lib,test: remove all unused variables --- lib/_http_client.js | 1 - lib/internal/repl.js | 6 ------ lib/os.js | 1 - test/addons/at-exit/test.js | 2 +- test/addons/repl-domain-abort/test.js | 2 +- test/debugger/test-debugger-pid.js | 8 -------- test/debugger/test-debugger-remote.js | 2 -- test/internet/test-dns-txt-sigsegv.js | 1 - test/internet/test-dns.js | 5 ++--- test/internet/test-http-dns-fail.js | 1 - test/internet/test-net-connect-timeout.js | 1 - test/internet/test-net-connect-unref.js | 1 - test/message/2100bytes.js | 3 --- test/message/error_exit.js | 1 - test/message/eval_messages.js | 3 --- test/message/hello_world.js | 2 -- test/message/max_tick_depth.js | 1 - test/message/nexttick_throw.js | 2 -- test/message/stack_overflow.js | 2 -- test/message/stdin_messages.js | 3 --- test/message/throw_custom_error.js | 2 -- test/message/throw_custom_error.out | 2 +- test/message/throw_in_line_with_tabs.js | 2 -- test/message/throw_in_line_with_tabs.out | 2 +- test/message/throw_non_error.js | 2 -- test/message/throw_non_error.out | 2 +- test/message/throw_null.js | 2 -- test/message/throw_null.out | 2 +- test/message/throw_undefined.js | 2 -- test/message/throw_undefined.out | 2 +- test/message/timeout_throw.js | 2 -- test/message/undefined_reference_in_new_context.js | 2 -- test/message/vm_display_runtime_error.js | 2 -- test/message/vm_display_syntax_error.js | 2 -- test/message/vm_dont_display_runtime_error.js | 2 -- test/message/vm_dont_display_syntax_error.js | 2 -- test/parallel/test-assert.js | 2 -- test/parallel/test-beforeexit-event.js | 1 - test/parallel/test-buffer-arraybuffer.js | 2 -- test/parallel/test-buffer-ascii.js | 1 - test/parallel/test-buffer-bytelength.js | 1 - test/parallel/test-buffer-concat.js | 1 - test/parallel/test-buffer-fakes.js | 2 -- test/parallel/test-buffer-indexof.js | 1 - test/parallel/test-buffer-inspect.js | 1 - test/parallel/test-buffer-iterator.js | 1 - test/parallel/test-buffer-slow.js | 1 - test/parallel/test-child-process-buffering.js | 2 -- test/parallel/test-child-process-constructor.js | 1 - test/parallel/test-child-process-cwd.js | 2 -- test/parallel/test-child-process-detached.js | 1 - test/parallel/test-child-process-exec-buffer.js | 4 ++-- test/parallel/test-child-process-exec-cwd.js | 2 +- test/parallel/test-child-process-fork-and-spawn.js | 1 - test/parallel/test-child-process-fork-dgram.js | 1 - test/parallel/test-child-process-fork-exec-path.js | 1 - test/parallel/test-child-process-fork-ref.js | 1 - test/parallel/test-child-process-fork-ref2.js | 2 -- test/parallel/test-child-process-internal.js | 1 - test/parallel/test-child-process-set-blocking.js | 1 - test/parallel/test-child-process-silent.js | 1 - test/parallel/test-child-process-spawn-error.js | 1 - test/parallel/test-child-process-spawnsync-env.js | 1 - .../parallel/test-child-process-spawnsync-input.js | 1 - .../test-child-process-spawnsync-timeout.js | 1 - test/parallel/test-child-process-stdin-ipc.js | 1 - test/parallel/test-child-process-stdin.js | 2 ++ .../test-child-process-stdio-big-write-end.js | 1 - test/parallel/test-child-process-stdio-inherit.js | 2 +- test/parallel/test-child-process-stdio.js | 1 - .../test-child-process-stdout-flush-exit.js | 1 - test/parallel/test-child-process-validate-stdio.js | 1 - test/parallel/test-cli-eval.js | 8 +++----- test/parallel/test-cluster-debug-port.js | 1 - test/parallel/test-cluster-dgram-2.js | 1 - test/parallel/test-cluster-eaddrinuse.js | 1 - test/parallel/test-cluster-fork-env.js | 1 - test/parallel/test-cluster-http-pipe.js | 1 - test/parallel/test-cluster-net-listen.js | 1 - test/parallel/test-cluster-setup-master-argv.js | 1 - .../test-cluster-setup-master-cumulative.js | 1 - test/parallel/test-cluster-setup-master-emit.js | 1 - .../parallel/test-cluster-setup-master-multiple.js | 1 - test/parallel/test-cluster-setup-master.js | 1 - test/parallel/test-cluster-uncaught-exception.js | 1 - test/parallel/test-cluster-worker-constructor.js | 1 - test/parallel/test-cluster-worker-death.js | 1 - test/parallel/test-cluster-worker-forced-exit.js | 1 - test/parallel/test-cluster-worker-init.js | 1 - test/parallel/test-cluster-worker-isconnected.js | 1 - test/parallel/test-cluster-worker-isdead.js | 1 - test/parallel/test-console-instance.js | 1 - test/parallel/test-console-not-call-toString.js | 1 - test/parallel/test-console.js | 1 - test/parallel/test-crypto-binary-default.js | 1 - test/parallel/test-crypto-certificate.js | 1 - test/parallel/test-crypto-dh-odd-key.js | 1 - test/parallel/test-crypto-dh.js | 2 +- test/parallel/test-crypto-verify-failure.js | 12 +++--------- test/parallel/test-debug-signal-cluster.js | 1 - test/parallel/test-delayed-require.js | 1 - test/parallel/test-dgram-bind.js | 1 - test/parallel/test-dgram-bytes-length.js | 1 - test/parallel/test-dgram-empty-packet.js | 3 --- test/parallel/test-dgram-error-message-address.js | 1 - test/parallel/test-dgram-listen-after-bind.js | 1 - test/parallel/test-dgram-pingpong.js | 1 + test/parallel/test-dgram-ref.js | 1 - test/parallel/test-dgram-regress-4496.js | 1 - test/parallel/test-dgram-send-bad-arguments.js | 1 - .../test-dgram-send-callback-buffer-length.js | 2 -- test/parallel/test-dgram-send-empty-buffer.js | 4 ---- test/parallel/test-dgram-udp4.js | 3 +-- test/parallel/test-dgram-unref.js | 1 - test/parallel/test-dh-padding.js | 2 -- test/parallel/test-dns-cares-domains.js | 1 - test/parallel/test-dns-lookup-cb-error.js | 1 - test/parallel/test-dns-regress-7070.js | 1 - test/parallel/test-dns.js | 1 - test/parallel/test-domain-exit-dispose-again.js | 1 - test/parallel/test-domain-exit-dispose.js | 1 - test/parallel/test-domain-from-timer.js | 1 - test/parallel/test-domain-http-server.js | 1 - test/parallel/test-domain-implicit-fs.js | 3 --- test/parallel/test-domain-multi.js | 1 - test/parallel/test-domain-nested-throw.js | 1 - test/parallel/test-domain-stack.js | 3 --- test/parallel/test-domain-timers.js | 1 - test/parallel/test-domain.js | 1 - test/parallel/test-eval-require.js | 2 -- test/parallel/test-eval.js | 2 +- test/parallel/test-event-emitter-add-listeners.js | 1 - .../test-event-emitter-check-listener-leaks.js | 1 - .../test-event-emitter-get-max-listeners.js | 1 - test/parallel/test-event-emitter-listener-count.js | 1 - .../test-event-emitter-listeners-side-effects.js | 4 ---- test/parallel/test-event-emitter-listeners.js | 1 - test/parallel/test-event-emitter-max-listeners.js | 1 - test/parallel/test-event-emitter-method-names.js | 1 - test/parallel/test-event-emitter-modify-in-emit.js | 1 - ...ent-emitter-no-error-provided-to-error-event.js | 1 - test/parallel/test-event-emitter-num-args.js | 1 - test/parallel/test-event-emitter-once.js | 1 - .../test-event-emitter-remove-listeners.js | 5 ----- ...event-emitter-set-max-listeners-side-effects.js | 1 - test/parallel/test-event-emitter-subclass.js | 1 - test/parallel/test-exception-handler.js | 1 - test/parallel/test-exception-handler2.js | 1 - test/parallel/test-exec-max-buffer.js | 1 - test/parallel/test-file-write-stream2.js | 3 --- test/parallel/test-file-write-stream3.js | 14 ++++---------- test/parallel/test-fs-exists.js | 1 - test/parallel/test-fs-make-callback.js | 1 - test/parallel/test-fs-null-bytes.js | 1 - test/parallel/test-fs-open-flags.js | 6 ------ test/parallel/test-fs-open.js | 2 -- test/parallel/test-fs-read-file-sync-hostname.js | 1 - test/parallel/test-fs-readfile-zero-byte-liar.js | 1 - test/parallel/test-fs-stat.js | 1 - test/parallel/test-fs-sync-fd-leak.js | 1 - test/parallel/test-fs-utimes.js | 2 +- test/parallel/test-fs-write-file-sync.js | 3 --- test/parallel/test-fs-write-no-fd.js | 1 - test/parallel/test-handle-wrap-close-abort.js | 2 -- test/parallel/test-http-1.0-keep-alive.js | 1 - test/parallel/test-http-304.js | 1 - test/parallel/test-http-abort-client.js | 2 +- test/parallel/test-http-after-connect.js | 2 +- test/parallel/test-http-agent-false.js | 1 - test/parallel/test-http-agent-getname.js | 1 - test/parallel/test-http-agent-keepalive.js | 1 - test/parallel/test-http-agent-null.js | 1 - test/parallel/test-http-buffer-sanity.js | 1 - test/parallel/test-http-byteswritten.js | 1 - test/parallel/test-http-client-abort2.js | 1 - test/parallel/test-http-client-encoding.js | 2 -- test/parallel/test-http-client-pipe-end.js | 1 - test/parallel/test-http-client-readable.js | 1 - test/parallel/test-http-client-unescaped-path.js | 1 - test/parallel/test-http-default-port.js | 2 +- test/parallel/test-http-destroyed-socket-write2.js | 1 - test/parallel/test-http-eof-on-connect.js | 1 - test/parallel/test-http-exceptions.js | 4 +--- test/parallel/test-http-flush.js | 1 - test/parallel/test-http-head-request.js | 2 -- .../test-http-header-response-splitting.js | 2 +- .../test-http-incoming-pipelined-socket-destroy.js | 1 - .../test-http-keep-alive-close-on-header.js | 1 - test/parallel/test-http-keep-alive.js | 1 - test/parallel/test-http-legacy.js | 4 ---- test/parallel/test-http-localaddress-bind-error.js | 2 +- test/parallel/test-http-many-ended-pipelines.js | 1 - test/parallel/test-http-methods.js | 1 - test/parallel/test-http-no-content-length.js | 2 +- test/parallel/test-http-parser-bad-ref.js | 1 - test/parallel/test-http-parser.js | 1 - test/parallel/test-http-proxy.js | 4 ++-- test/parallel/test-http-raw-headers.js | 8 -------- test/parallel/test-http-res-write-after-end.js | 2 +- test/parallel/test-http-server-stale-close.js | 1 - test/parallel/test-http-timeout.js | 2 -- test/parallel/test-http-unix-socket.js | 1 - test/parallel/test-http-url.parse-https.request.js | 1 - ...p-url.parse-only-support-http-https-protocol.js | 1 - test/parallel/test-http.js | 4 ---- test/parallel/test-https-agent-servername.js | 1 - test/parallel/test-https-byteswritten.js | 1 - test/parallel/test-https-eof-for-eom.js | 2 +- .../parallel/test-https-localaddress-bind-error.js | 2 +- test/parallel/test-https-socket-options.js | 4 ---- test/parallel/test-https-strict.js | 1 - test/parallel/test-https-timeout-server-2.js | 1 - test/parallel/test-https-timeout-server.js | 1 - test/parallel/test-https-timeout.js | 2 -- test/parallel/test-https-truncate.js | 1 - test/parallel/test-internal-modules-expose.js | 1 - test/parallel/test-internal-modules.js | 1 - test/parallel/test-intl.js | 1 - test/parallel/test-listen-fd-cluster.js | 1 - test/parallel/test-listen-fd-ebadf.js | 1 - test/parallel/test-listen-fd-server.js | 1 - .../test-microtask-queue-integration-domain.js | 2 -- test/parallel/test-microtask-queue-integration.js | 1 - test/parallel/test-microtask-queue-run-domain.js | 2 -- .../test-microtask-queue-run-immediate-domain.js | 2 -- .../parallel/test-microtask-queue-run-immediate.js | 1 - test/parallel/test-microtask-queue-run.js | 1 - test/parallel/test-net-create-connection.js | 2 +- test/parallel/test-net-dns-custom-lookup.js | 1 - test/parallel/test-net-dns-error.js | 1 - test/parallel/test-net-end-without-connect.js | 1 - test/parallel/test-net-isip.js | 1 - test/parallel/test-net-listen-close-server.js | 1 - test/parallel/test-net-listen-fd0.js | 1 - test/parallel/test-net-local-address-port.js | 2 +- test/parallel/test-net-localerror.js | 2 +- test/parallel/test-net-reconnect.js | 1 - test/parallel/test-net-server-connections.js | 1 - test/parallel/test-net-server-unref-persistent.js | 1 - test/parallel/test-next-tick-domain.js | 1 - test/parallel/test-next-tick-errors.js | 1 - .../test-next-tick-intentional-starvation.js | 1 - test/parallel/test-next-tick-ordering.js | 1 - test/parallel/test-next-tick-ordering2.js | 1 - test/parallel/test-next-tick.js | 1 - test/parallel/test-path-zero-length-strings.js | 1 - test/parallel/test-pipe-return-val.js | 2 -- test/parallel/test-preload.js | 8 +++----- test/parallel/test-process-before-exit.js | 1 - test/parallel/test-process-config.js | 1 - test/parallel/test-process-env.js | 1 - test/parallel/test-process-exit-code.js | 1 - test/parallel/test-process-exit.js | 1 - test/parallel/test-process-getgroups.js | 1 - test/parallel/test-process-hrtime.js | 1 - test/parallel/test-process-kill-null.js | 1 - test/parallel/test-process-kill-pid.js | 1 - test/parallel/test-process-next-tick.js | 1 - test/parallel/test-process-raw-debug.js | 1 - test/parallel/test-process-wrap.js | 1 - .../parallel/test-promises-unhandled-rejections.js | 6 ++---- test/parallel/test-punycode.js | 1 - test/parallel/test-querystring.js | 1 - test/parallel/test-readdouble.js | 1 - test/parallel/test-readfloat.js | 1 - test/parallel/test-readint.js | 1 - test/parallel/test-readline-keys.js | 3 +-- test/parallel/test-readuint.js | 1 - test/parallel/test-ref-unref-return.js | 1 - test/parallel/test-regress-GH-4256.js | 2 +- test/parallel/test-regress-GH-6235.js | 1 - test/parallel/test-regress-GH-7511.js | 5 ++--- test/parallel/test-regress-GH-897.js | 1 - test/parallel/test-repl-autolibs.js | 2 +- test/parallel/test-repl-console.js | 7 +++---- test/parallel/test-repl-domain.js | 4 +--- test/parallel/test-repl-end-emits-exit.js | 11 +++++------ test/parallel/test-repl-harmony.js | 1 - test/parallel/test-repl-require-cache.js | 5 ++--- test/parallel/test-repl-setprompt.js | 9 ++++----- test/parallel/test-repl-syntax-error-handling.js | 1 - test/parallel/test-repl-tab.js | 1 - .../test-repl-unexpected-token-recoverable.js | 1 - test/parallel/test-require-cache.js | 1 - test/parallel/test-require-extensions-main.js | 1 - test/parallel/test-signal-safety.js | 1 - test/parallel/test-stdin-hang.js | 1 - test/parallel/test-stdio-readable-writable.js | 1 - test/parallel/test-stdout-close-unref.js | 1 - test/parallel/test-stream-big-packet.js | 1 - test/parallel/test-stream-big-push.js | 1 - test/parallel/test-stream-duplex.js | 1 - test/parallel/test-stream-end-paused.js | 1 - test/parallel/test-stream-ispaused.js | 1 - test/parallel/test-stream-pipe-after-end.js | 1 - test/parallel/test-stream-pipe-cleanup.js | 1 - test/parallel/test-stream-pipe-error-handling.js | 3 --- test/parallel/test-stream-pipe-event.js | 1 - test/parallel/test-stream-push-order.js | 3 +-- test/parallel/test-stream-push-strings.js | 1 - ...test-stream-readable-constructor-set-methods.js | 1 - test/parallel/test-stream-readable-event.js | 1 - .../test-stream-readable-flow-recursion.js | 1 - ...est-stream-transform-constructor-set-methods.js | 1 - ...est-stream-transform-objectmode-falsey-value.js | 1 - .../test-stream-transform-split-objectmode.js | 1 - test/parallel/test-stream-unshift-empty-chunk.js | 1 - test/parallel/test-stream-unshift-read-race.js | 2 -- test/parallel/test-stream-wrap.js | 1 - ...test-stream-writable-change-default-encoding.js | 1 - ...test-stream-writable-constructor-set-methods.js | 1 - .../test-stream-writable-decoded-encoding.js | 1 - test/parallel/test-stream-writev.js | 3 --- .../test-stream2-base64-single-char-read-end.js | 1 - test/parallel/test-stream2-compatibility.js | 5 +---- test/parallel/test-stream2-finish-pipe.js | 1 - test/parallel/test-stream2-large-read-stall.js | 3 +-- test/parallel/test-stream2-objects.js | 3 +-- test/parallel/test-stream2-pipe-error-handling.js | 1 - .../test-stream2-pipe-error-once-listener.js | 2 -- test/parallel/test-stream2-push.js | 2 -- test/parallel/test-stream2-read-sync-stack.js | 1 - .../test-stream2-readable-empty-buffer-no-eof.js | 1 - test/parallel/test-stream2-readable-from-list.js | 5 ----- .../parallel/test-stream2-readable-legacy-drain.js | 1 - .../test-stream2-readable-non-empty-end.js | 1 - test/parallel/test-stream2-readable-wrap-empty.js | 1 - test/parallel/test-stream2-readable-wrap.js | 1 - test/parallel/test-stream2-set-encoding.js | 1 - test/parallel/test-stream2-transform.js | 4 ---- test/parallel/test-stream2-unpipe-leak.js | 1 - test/parallel/test-stream2-writable.js | 1 - test/parallel/test-stream3-pause-then-read.js | 1 - test/parallel/test-string-decoder.js | 1 - test/parallel/test-stringbytes-external.js | 1 - test/parallel/test-timers-args.js | 1 - test/parallel/test-timers-immediate-queue.js | 1 - test/parallel/test-timers-immediate.js | 1 - test/parallel/test-timers-linked-list.js | 1 - test/parallel/test-timers-non-integer-delay.js | 2 -- test/parallel/test-timers-now.js | 1 - test/parallel/test-timers-ordering.js | 5 +---- ...ket-timeout-removes-other-socket-unref-timer.js | 1 - test/parallel/test-timers-uncaught-exception.js | 1 - test/parallel/test-timers-unref-active.js | 1 - test/parallel/test-timers-unref-call.js | 2 -- ...ref-remove-other-unref-timers-only-one-fires.js | 1 - test/parallel/test-timers-unref.js | 1 - test/parallel/test-timers-zero-timeout.js | 3 +-- test/parallel/test-timers.js | 1 - test/parallel/test-tls-0-dns-altname.js | 3 --- .../parallel/test-tls-async-cb-after-socket-end.js | 1 - test/parallel/test-tls-client-default-ciphers.js | 2 +- test/parallel/test-tls-close-error.js | 1 - test/parallel/test-tls-close-notify.js | 2 -- test/parallel/test-tls-destroy-whilst-write.js | 1 - test/parallel/test-tls-fast-writing.js | 2 +- test/parallel/test-tls-handshake-error.js | 2 -- test/parallel/test-tls-handshake-nohang.js | 1 - test/parallel/test-tls-inception.js | 2 +- test/parallel/test-tls-invoke-queued.js | 3 --- test/parallel/test-tls-key-mismatch.js | 2 -- test/parallel/test-tls-legacy-onselect.js | 10 ---------- test/parallel/test-tls-max-send-fragment.js | 3 --- test/parallel/test-tls-ocsp-callback.js | 1 - .../parallel/test-tls-peer-certificate-encoding.js | 1 - .../test-tls-peer-certificate-multi-keys.js | 1 - test/parallel/test-tls-peer-certificate.js | 1 - test/parallel/test-tls-request-timeout.js | 2 +- test/parallel/test-tls-ticket-cluster.js | 1 - test/parallel/test-tty-wrap.js | 1 - test/parallel/test-url.js | 8 +------- test/parallel/test-utf8-scripts.js | 1 - test/parallel/test-util-format.js | 1 - test/parallel/test-util-inspect.js | 1 - test/parallel/test-util.js | 1 - test/parallel/test-v8-flag-type-check.js | 1 - test/parallel/test-v8-flags.js | 1 - test/parallel/test-v8-stats.js | 1 - test/parallel/test-vm-basic.js | 1 - test/parallel/test-vm-context-async-script.js | 1 - .../test-vm-context-property-forwarding.js | 1 - test/parallel/test-vm-context.js | 1 - test/parallel/test-vm-create-and-run-in-context.js | 1 - test/parallel/test-vm-create-context-accessors.js | 1 - test/parallel/test-vm-create-context-arg.js | 7 +++---- .../test-vm-create-context-circular-reference.js | 1 - test/parallel/test-vm-cross-context.js | 1 - test/parallel/test-vm-function-declaration.js | 1 - test/parallel/test-vm-global-define-property.js | 1 - test/parallel/test-vm-global-identity.js | 1 - test/parallel/test-vm-harmony-proxies.js | 5 ++--- test/parallel/test-vm-harmony-symbols.js | 5 ++--- test/parallel/test-vm-is-context.js | 1 - test/parallel/test-vm-new-script-new-context.js | 3 +-- test/parallel/test-vm-preserves-property.js | 1 - test/parallel/test-vm-run-in-new-context.js | 2 +- test/parallel/test-vm-static-this.js | 2 +- test/parallel/test-vm-symbols.js | 1 - test/parallel/test-vm-syntax-error-message.js | 1 - test/parallel/test-vm-timeout.js | 1 - test/parallel/test-writedouble.js | 1 - test/parallel/test-writefloat.js | 1 - test/parallel/test-writeint.js | 1 - test/parallel/test-writeuint.js | 1 - test/parallel/test-zlib-close-after-write.js | 1 - test/parallel/test-zlib-const.js | 1 - test/parallel/test-zlib-convenience-methods.js | 1 - test/parallel/test-zlib-dictionary.js | 2 -- test/parallel/test-zlib-from-string.js | 1 - test/parallel/test-zlib-invalid-input.js | 5 ++--- test/parallel/test-zlib-write-after-close.js | 1 - test/parallel/test-zlib-write-after-flush.js | 2 -- test/parallel/test-zlib-zero-byte.js | 1 - test/pummel/test-crypto-dh.js | 1 - test/pummel/test-dtrace-jsstack.js | 5 ----- test/pummel/test-fs-watch-file.js | 1 - test/pummel/test-http-client-reconnect-bug.js | 5 ++--- test/pummel/test-http-upload-timeout.js | 9 ++++----- test/pummel/test-https-no-reader.js | 3 --- test/pummel/test-keep-alive.js | 1 - test/pummel/test-next-tick-infinite-calls.js | 2 -- test/pummel/test-process-hrtime.js | 1 - test/pummel/test-process-uptime.js | 1 - test/pummel/test-regress-GH-892.js | 5 ----- test/pummel/test-stream-pipe-multi.js | 1 - test/pummel/test-stream2-basic.js | 3 --- test/pummel/test-timer-wrap.js | 1 - test/pummel/test-timer-wrap2.js | 4 +--- test/pummel/test-timers.js | 7 +++---- test/pummel/test-tls-securepair-client.js | 4 ---- test/pummel/test-vm-memleak.js | 1 - test/pummel/test-watch-file.js | 1 - test/sequential/test-child-process-execsync.js | 1 - test/sequential/test-debug-args.js | 1 - test/sequential/test-deprecation-flags.js | 1 - test/sequential/test-mkdir-rmdir.js | 1 - test/sequential/test-net-GH-5504.js | 1 - .../test-net-listen-exclusive-random-ports.js | 1 - test/sequential/test-pump-file2tcp.js | 1 - test/sequential/test-regress-GH-1697.js | 5 ++--- test/sequential/test-regress-GH-1726.js | 1 - test/sequential/test-regress-GH-819.js | 2 -- test/sequential/test-repl-persistent-history.js | 1 - test/sequential/test-setproctitle.js | 1 - test/sequential/test-sigint-infinite-loop.js | 1 - test/sequential/test-stdin-child-proc.js | 1 - test/sequential/test-stdin-pipe-resume.js | 1 - test/sequential/test-stdin-script-child.js | 1 - ...t-stdout-cannot-be-closed-child-process-pipe.js | 1 - test/sequential/test-stdout-close-catch.js | 1 - test/sequential/test-stdout-stderr-reading.js | 1 - test/sequential/test-stream2-fs.js | 2 -- test/sequential/test-stream2-stderr-sync.js | 6 ------ test/sequential/test-sync-fileread.js | 1 - test/sequential/test-tcp-wrap-listen.js | 2 +- test/sequential/test-util-debug.js | 1 - test/timers/test-timers-reliability.js | 4 +--- 458 files changed, 107 insertions(+), 703 deletions(-) diff --git a/lib/_http_client.js b/lib/_http_client.js index e490dce5d821d6..e4c672a81fbe87 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -3,7 +3,6 @@ const util = require('util'); const net = require('net'); const url = require('url'); -const EventEmitter = require('events').EventEmitter; const HTTPParser = process.binding('http_parser').HTTPParser; const assert = require('assert').ok; const common = require('_http_common'); diff --git a/lib/internal/repl.js b/lib/internal/repl.js index b2c74e179c59d0..fb3e62171cb9c4 100644 --- a/lib/internal/repl.js +++ b/lib/internal/repl.js @@ -14,12 +14,6 @@ module.exports.createInternalRepl = createRepl; // The debounce is to guard against code pasted into the REPL. const kDebounceHistoryMS = 15; -// XXX(chrisdickinson): hack to make sure that the internal debugger -// uses the original repl. -function replStart() { - return REPL.start.apply(REPL, arguments); -} - function createRepl(env, opts, cb) { if (typeof opts === 'function') { cb = opts; diff --git a/lib/os.js b/lib/os.js index 2d537f53840a35..ddf7cee9d48791 100644 --- a/lib/os.js +++ b/lib/os.js @@ -1,7 +1,6 @@ 'use strict'; const binding = process.binding('os'); -const util = require('util'); const internalUtil = require('internal/util'); const isWindows = process.platform === 'win32'; diff --git a/test/addons/at-exit/test.js b/test/addons/at-exit/test.js index c36f59b976e983..b8e666387f9d2f 100644 --- a/test/addons/at-exit/test.js +++ b/test/addons/at-exit/test.js @@ -1,2 +1,2 @@ 'use strict'; -var binding = require('./build/Release/binding'); +require('./build/Release/binding'); diff --git a/test/addons/repl-domain-abort/test.js b/test/addons/repl-domain-abort/test.js index a520df03805ccb..6200f4a1e7906c 100644 --- a/test/addons/repl-domain-abort/test.js +++ b/test/addons/repl-domain-abort/test.js @@ -41,4 +41,4 @@ var options = { }; // Run commands from fake REPL. -var dummy = repl.start(options); +repl.start(options); diff --git a/test/debugger/test-debugger-pid.js b/test/debugger/test-debugger-pid.js index 14a281ab3ce4cc..e5368c20f6e4f0 100644 --- a/test/debugger/test-debugger-pid.js +++ b/test/debugger/test-debugger-pid.js @@ -1,16 +1,8 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var port = common.PORT + 1337; var buffer = ''; -var expected = []; -var scriptToDebug = common.fixturesDir + '/empty.js'; - -function fail() { - assert(0); // `--debug-brk script.js` should not quit -} // connect to debug agent var interfacer = spawn(process.execPath, ['debug', '-p', '655555']); diff --git a/test/debugger/test-debugger-remote.js b/test/debugger/test-debugger-remote.js index 81ed8b41ab0198..f5232dce9c8df4 100644 --- a/test/debugger/test-debugger-remote.js +++ b/test/debugger/test-debugger-remote.js @@ -3,9 +3,7 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var port = common.PORT + 1337; var buffer = ''; -var expected = []; var scriptToDebug = common.fixturesDir + '/empty.js'; function fail() { diff --git a/test/internet/test-dns-txt-sigsegv.js b/test/internet/test-dns-txt-sigsegv.js index eba5c66c464981..ce2e104ba0e37f 100644 --- a/test/internet/test-dns-txt-sigsegv.js +++ b/test/internet/test-dns-txt-sigsegv.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var dns = require('dns'); diff --git a/test/internet/test-dns.js b/test/internet/test-dns.js index c3a9e03753d133..152ffc4db93290 100644 --- a/test/internet/test-dns.js +++ b/test/internet/test-dns.js @@ -3,7 +3,6 @@ var common = require('../common'); var assert = require('assert'), dns = require('dns'), net = require('net'), - isIP = net.isIP, isIPv4 = net.isIPv4, isIPv6 = net.isIPv6; var util = require('util'); @@ -117,7 +116,7 @@ TEST(function test_reverse_bogus(done) { var error; try { - var req = dns.reverse('bogus ip', function() { + dns.reverse('bogus ip', function() { assert.ok(false); }); } catch (e) { @@ -716,7 +715,7 @@ console.log('looking up nodejs.org...'); var cares = process.binding('cares_wrap'); var req = new cares.GetAddrInfoReqWrap(); -var err = cares.getaddrinfo(req, 'nodejs.org', 4); +cares.getaddrinfo(req, 'nodejs.org', 4); req.oncomplete = function(err, domains) { assert.strictEqual(err, 0); diff --git a/test/internet/test-http-dns-fail.js b/test/internet/test-http-dns-fail.js index 151597de14cb0e..77bd2d36defa7d 100644 --- a/test/internet/test-http-dns-fail.js +++ b/test/internet/test-http-dns-fail.js @@ -4,7 +4,6 @@ * should trigger the error event after each attempt. */ -var common = require('../common'); var assert = require('assert'); var http = require('http'); diff --git a/test/internet/test-net-connect-timeout.js b/test/internet/test-net-connect-timeout.js index b92d234852967e..f3606b0a4e8893 100644 --- a/test/internet/test-net-connect-timeout.js +++ b/test/internet/test-net-connect-timeout.js @@ -3,7 +3,6 @@ // https://groups.google.com/forum/#!topic/nodejs/UE0ZbfLt6t8 // https://groups.google.com/forum/#!topic/nodejs-dev/jR7-5UDqXkw -var common = require('../common'); var net = require('net'); var assert = require('assert'); diff --git a/test/internet/test-net-connect-unref.js b/test/internet/test-net-connect-unref.js index a712490d31f566..ec7077c5160a8f 100644 --- a/test/internet/test-net-connect-unref.js +++ b/test/internet/test-net-connect-unref.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/message/2100bytes.js b/test/message/2100bytes.js index b05f5e9e1d7168..3088ac2f651d23 100644 --- a/test/message/2100bytes.js +++ b/test/message/2100bytes.js @@ -1,7 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var util = require('util'); console.log([ '_______________________________________________50', diff --git a/test/message/error_exit.js b/test/message/error_exit.js index 7805fd21935377..e00ff6b71ccdbb 100644 --- a/test/message/error_exit.js +++ b/test/message/error_exit.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); process.on('exit', function(code) { diff --git a/test/message/eval_messages.js b/test/message/eval_messages.js index 0b17bf5f97ae52..7d75d304760ac2 100644 --- a/test/message/eval_messages.js +++ b/test/message/eval_messages.js @@ -1,8 +1,5 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); - var spawn = require('child_process').spawn; function run(cmd, strict, cb) { diff --git a/test/message/hello_world.js b/test/message/hello_world.js index 1e6b030393c6cf..770fed2d1aad73 100644 --- a/test/message/hello_world.js +++ b/test/message/hello_world.js @@ -1,5 +1,3 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); console.log('hello world'); diff --git a/test/message/max_tick_depth.js b/test/message/max_tick_depth.js index cacd795810605a..c2745e0660c79e 100644 --- a/test/message/max_tick_depth.js +++ b/test/message/max_tick_depth.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); process.maxTickDepth = 10; var i = 20; diff --git a/test/message/nexttick_throw.js b/test/message/nexttick_throw.js index 3c0e2d8e379fd9..f638fff7163653 100644 --- a/test/message/nexttick_throw.js +++ b/test/message/nexttick_throw.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); process.nextTick(function() { process.nextTick(function() { diff --git a/test/message/stack_overflow.js b/test/message/stack_overflow.js index 7d1033c3ab2b1a..d95ec3fdfaca7e 100644 --- a/test/message/stack_overflow.js +++ b/test/message/stack_overflow.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); Error.stackTraceLimit = 0; diff --git a/test/message/stdin_messages.js b/test/message/stdin_messages.js index e99c08553a916d..255e6940132faf 100644 --- a/test/message/stdin_messages.js +++ b/test/message/stdin_messages.js @@ -1,8 +1,5 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); - var spawn = require('child_process').spawn; function run(cmd, strict, cb) { diff --git a/test/message/throw_custom_error.js b/test/message/throw_custom_error.js index bb5dae05a9b03a..9c09bf3a356a1c 100644 --- a/test/message/throw_custom_error.js +++ b/test/message/throw_custom_error.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); // custom error throwing throw ({ name: 'MyCustomError', message: 'This is a custom message' }); diff --git a/test/message/throw_custom_error.out b/test/message/throw_custom_error.out index ef73c52c889dff..50eb78d6759941 100644 --- a/test/message/throw_custom_error.out +++ b/test/message/throw_custom_error.out @@ -1,4 +1,4 @@ -*test*message*throw_custom_error.js:6 +*test*message*throw_custom_error.js:4 throw ({ name: 'MyCustomError', message: 'This is a custom message' }); ^ MyCustomError: This is a custom message diff --git a/test/message/throw_in_line_with_tabs.js b/test/message/throw_in_line_with_tabs.js index 50c69ca681019d..897834d8d6354f 100644 --- a/test/message/throw_in_line_with_tabs.js +++ b/test/message/throw_in_line_with_tabs.js @@ -1,7 +1,5 @@ /* eslint-disable indent */ 'use strict'; -var common = require('../common'); -var assert = require('assert'); console.error('before'); diff --git a/test/message/throw_in_line_with_tabs.out b/test/message/throw_in_line_with_tabs.out index e83b05768433b8..11eadab34bead1 100644 --- a/test/message/throw_in_line_with_tabs.out +++ b/test/message/throw_in_line_with_tabs.out @@ -1,5 +1,5 @@ before -*test*message*throw_in_line_with_tabs.js:10 +*test*message*throw_in_line_with_tabs.js:8 throw ({ foo: 'bar' }); ^ [object Object] diff --git a/test/message/throw_non_error.js b/test/message/throw_non_error.js index a1046b725e93a4..0ee26656845428 100644 --- a/test/message/throw_non_error.js +++ b/test/message/throw_non_error.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); // custom error throwing throw ({ foo: 'bar' }); diff --git a/test/message/throw_non_error.out b/test/message/throw_non_error.out index 15f95fcc11699a..12528efda529a2 100644 --- a/test/message/throw_non_error.out +++ b/test/message/throw_non_error.out @@ -1,4 +1,4 @@ -*test*message*throw_non_error.js:6 +*test*message*throw_non_error.js:4 throw ({ foo: 'bar' }); ^ [object Object] diff --git a/test/message/throw_null.js b/test/message/throw_null.js index ab8fb565a61e54..562e969ac350f2 100644 --- a/test/message/throw_null.js +++ b/test/message/throw_null.js @@ -1,5 +1,3 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); throw null; diff --git a/test/message/throw_null.out b/test/message/throw_null.out index eb3eeb1294e727..d4af082108e321 100644 --- a/test/message/throw_null.out +++ b/test/message/throw_null.out @@ -1,5 +1,5 @@ -*test*message*throw_null.js:5 +*test*message*throw_null.js:3 throw null; ^ null diff --git a/test/message/throw_undefined.js b/test/message/throw_undefined.js index f855cdd2f7dabd..f062276767408d 100644 --- a/test/message/throw_undefined.js +++ b/test/message/throw_undefined.js @@ -1,5 +1,3 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); throw undefined; diff --git a/test/message/throw_undefined.out b/test/message/throw_undefined.out index c23dac051fa5f1..d2351b1ba2b9ce 100644 --- a/test/message/throw_undefined.out +++ b/test/message/throw_undefined.out @@ -1,5 +1,5 @@ -*test*message*throw_undefined.js:5 +*test*message*throw_undefined.js:3 throw undefined; ^ undefined diff --git a/test/message/timeout_throw.js b/test/message/timeout_throw.js index aaf3fbc8d2f48f..dd93458f7c4593 100644 --- a/test/message/timeout_throw.js +++ b/test/message/timeout_throw.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); setTimeout(function() { undefined_reference_error_maker; diff --git a/test/message/undefined_reference_in_new_context.js b/test/message/undefined_reference_in_new_context.js index 7256c0d8e36088..4cd7720319a531 100644 --- a/test/message/undefined_reference_in_new_context.js +++ b/test/message/undefined_reference_in_new_context.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); var vm = require('vm'); console.error('before'); diff --git a/test/message/vm_display_runtime_error.js b/test/message/vm_display_runtime_error.js index d01ab0b540b3cb..6aefc446ab66d1 100644 --- a/test/message/vm_display_runtime_error.js +++ b/test/message/vm_display_runtime_error.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); var vm = require('vm'); console.error('beginning'); diff --git a/test/message/vm_display_syntax_error.js b/test/message/vm_display_syntax_error.js index 179263478b84b8..3507dc78bf0163 100644 --- a/test/message/vm_display_syntax_error.js +++ b/test/message/vm_display_syntax_error.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); var vm = require('vm'); console.error('beginning'); diff --git a/test/message/vm_dont_display_runtime_error.js b/test/message/vm_dont_display_runtime_error.js index 6b4c824cbe5eff..4e781815ee8834 100644 --- a/test/message/vm_dont_display_runtime_error.js +++ b/test/message/vm_dont_display_runtime_error.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); var vm = require('vm'); console.error('beginning'); diff --git a/test/message/vm_dont_display_syntax_error.js b/test/message/vm_dont_display_syntax_error.js index 42b1ab14cba76f..db3f8c8b5998ad 100644 --- a/test/message/vm_dont_display_syntax_error.js +++ b/test/message/vm_dont_display_syntax_error.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); var vm = require('vm'); console.error('beginning'); diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index ce84eabc34e1d4..67eee91e1e7c79 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -273,8 +273,6 @@ assert.throws(makeBlock(a.deepStrictEqual, new Boolean(true), {}), function thrower(errorConstructor) { throw new errorConstructor('test'); } -var aethrow = makeBlock(thrower, a.AssertionError); -aethrow = makeBlock(thrower, a.AssertionError); // the basic calls work assert.throws(makeBlock(thrower, a.AssertionError), diff --git a/test/parallel/test-beforeexit-event.js b/test/parallel/test-beforeexit-event.js index f3bd127b408b08..8e5d66f5f5d7c7 100644 --- a/test/parallel/test-beforeexit-event.js +++ b/test/parallel/test-beforeexit-event.js @@ -1,7 +1,6 @@ 'use strict'; var assert = require('assert'); var net = require('net'); -var util = require('util'); var common = require('../common'); var revivals = 0; var deaths = 0; diff --git a/test/parallel/test-buffer-arraybuffer.js b/test/parallel/test-buffer-arraybuffer.js index c13d0ba4118aad..a8767f5a2f2b43 100644 --- a/test/parallel/test-buffer-arraybuffer.js +++ b/test/parallel/test-buffer-arraybuffer.js @@ -1,8 +1,6 @@ 'use strict'; -const common = require('../common'); const assert = require('assert'); - const Buffer = require('buffer').Buffer; const LENGTH = 16; diff --git a/test/parallel/test-buffer-ascii.js b/test/parallel/test-buffer-ascii.js index efc3a72c662595..719c4ebcf465dc 100644 --- a/test/parallel/test-buffer-ascii.js +++ b/test/parallel/test-buffer-ascii.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // ASCII conversion in node.js simply masks off the high bits, diff --git a/test/parallel/test-buffer-bytelength.js b/test/parallel/test-buffer-bytelength.js index c136c62808e8fc..57df0a54a491f4 100644 --- a/test/parallel/test-buffer-bytelength.js +++ b/test/parallel/test-buffer-bytelength.js @@ -1,6 +1,5 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Buffer = require('buffer').Buffer; diff --git a/test/parallel/test-buffer-concat.js b/test/parallel/test-buffer-concat.js index 8d0c0eebbd14e6..c731b13e84f609 100644 --- a/test/parallel/test-buffer-concat.js +++ b/test/parallel/test-buffer-concat.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var zero = []; diff --git a/test/parallel/test-buffer-fakes.js b/test/parallel/test-buffer-fakes.js index d473d16e92159f..9b361624799db8 100644 --- a/test/parallel/test-buffer-fakes.js +++ b/test/parallel/test-buffer-fakes.js @@ -1,9 +1,7 @@ 'use strict'; -const common = require('../common'); const assert = require('assert'); const Buffer = require('buffer').Buffer; -const Bp = Buffer.prototype; function FakeBuffer() { } FakeBuffer.__proto__ = Buffer; diff --git a/test/parallel/test-buffer-indexof.js b/test/parallel/test-buffer-indexof.js index 7ffbae525f8984..b65fcb40c1a4fa 100644 --- a/test/parallel/test-buffer-indexof.js +++ b/test/parallel/test-buffer-indexof.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Buffer = require('buffer').Buffer; diff --git a/test/parallel/test-buffer-inspect.js b/test/parallel/test-buffer-inspect.js index 35da378631aee8..b1dfec9e9de1be 100644 --- a/test/parallel/test-buffer-inspect.js +++ b/test/parallel/test-buffer-inspect.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-buffer-iterator.js b/test/parallel/test-buffer-iterator.js index 05371d6d793fed..7c8334f9cb40ce 100644 --- a/test/parallel/test-buffer-iterator.js +++ b/test/parallel/test-buffer-iterator.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var buffer = new Buffer([1, 2, 3, 4, 5]); diff --git a/test/parallel/test-buffer-slow.js b/test/parallel/test-buffer-slow.js index e652a6a0f95969..83f266c393f6ab 100644 --- a/test/parallel/test-buffer-slow.js +++ b/test/parallel/test-buffer-slow.js @@ -1,6 +1,5 @@ 'use strict'; -const common = require('../common'); const assert = require('assert'); const buffer = require('buffer'); const Buffer = buffer.Buffer; diff --git a/test/parallel/test-child-process-buffering.js b/test/parallel/test-child-process-buffering.js index a37e1dbbbd7574..1efa5a65f9cea8 100644 --- a/test/parallel/test-child-process-buffering.js +++ b/test/parallel/test-child-process-buffering.js @@ -2,8 +2,6 @@ var common = require('../common'); var assert = require('assert'); -var spawn = require('child_process').spawn; - var pwd_called = false; var childClosed = false; var childExited = false; diff --git a/test/parallel/test-child-process-constructor.js b/test/parallel/test-child-process-constructor.js index 89db9cf81fddc7..61e85bfe29ee77 100644 --- a/test/parallel/test-child-process-constructor.js +++ b/test/parallel/test-child-process-constructor.js @@ -1,7 +1,6 @@ 'use strict'; var assert = require('assert'); -var common = require('../common'); var child_process = require('child_process'); var ChildProcess = child_process.ChildProcess; assert.equal(typeof ChildProcess, 'function'); diff --git a/test/parallel/test-child-process-cwd.js b/test/parallel/test-child-process-cwd.js index e0e83b6007a815..f13da684fbdfe4 100644 --- a/test/parallel/test-child-process-cwd.js +++ b/test/parallel/test-child-process-cwd.js @@ -1,8 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var spawn = require('child_process').spawn; -var path = require('path'); var returns = 0; diff --git a/test/parallel/test-child-process-detached.js b/test/parallel/test-child-process-detached.js index 25b811a8caa991..1e854dcc6131ee 100644 --- a/test/parallel/test-child-process-detached.js +++ b/test/parallel/test-child-process-detached.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var path = require('path'); diff --git a/test/parallel/test-child-process-exec-buffer.js b/test/parallel/test-child-process-exec-buffer.js index 0ab05080a2cb87..a381af9631e0d8 100644 --- a/test/parallel/test-child-process-exec-buffer.js +++ b/test/parallel/test-child-process-exec-buffer.js @@ -9,7 +9,7 @@ var success_count = 0; var str = 'hello'; // default encoding -var child = exec('echo ' + str, function(err, stdout, stderr) { +exec('echo ' + str, function(err, stdout, stderr) { assert.ok('string', typeof(stdout), 'Expected stdout to be a string'); assert.ok('string', typeof(stderr), 'Expected stderr to be a string'); assert.equal(str + os.EOL, stdout); @@ -18,7 +18,7 @@ var child = exec('echo ' + str, function(err, stdout, stderr) { }); // no encoding (Buffers expected) -var child = exec('echo ' + str, { +exec('echo ' + str, { encoding: null }, function(err, stdout, stderr) { assert.ok(stdout instanceof Buffer, 'Expected stdout to be a Buffer'); diff --git a/test/parallel/test-child-process-exec-cwd.js b/test/parallel/test-child-process-exec-cwd.js index e253399b96ac30..c259ffffda3dee 100644 --- a/test/parallel/test-child-process-exec-cwd.js +++ b/test/parallel/test-child-process-exec-cwd.js @@ -16,7 +16,7 @@ if (common.isWindows) { dir = '/dev'; } -var child = exec(pwdcommand, {cwd: dir}, function(err, stdout, stderr) { +exec(pwdcommand, {cwd: dir}, function(err, stdout, stderr) { if (err) { error_count++; console.log('error!: ' + err.code); diff --git a/test/parallel/test-child-process-fork-and-spawn.js b/test/parallel/test-child-process-fork-and-spawn.js index d5255bf83ca8e0..0acaaf28d3c6c9 100644 --- a/test/parallel/test-child-process-fork-and-spawn.js +++ b/test/parallel/test-child-process-fork-and-spawn.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; var fork = require('child_process').fork; diff --git a/test/parallel/test-child-process-fork-dgram.js b/test/parallel/test-child-process-fork-dgram.js index f700960490cbaa..86cd6576c73b98 100644 --- a/test/parallel/test-child-process-fork-dgram.js +++ b/test/parallel/test-child-process-fork-dgram.js @@ -25,7 +25,6 @@ if (common.isWindows) { } if (process.argv[2] === 'child') { - var childCollected = 0; var server; process.on('message', function removeMe(msg, clusterServer) { diff --git a/test/parallel/test-child-process-fork-exec-path.js b/test/parallel/test-child-process-fork-exec-path.js index 6a61bddd8a19a4..35a730b0da6c42 100644 --- a/test/parallel/test-child-process-fork-exec-path.js +++ b/test/parallel/test-child-process-fork-exec-path.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var cp = require('child_process'); var fs = require('fs'); var path = require('path'); var common = require('../common'); diff --git a/test/parallel/test-child-process-fork-ref.js b/test/parallel/test-child-process-fork-ref.js index b4066641bae970..79973666dbac18 100644 --- a/test/parallel/test-child-process-fork-ref.js +++ b/test/parallel/test-child-process-fork-ref.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var fork = require('child_process').fork; diff --git a/test/parallel/test-child-process-fork-ref2.js b/test/parallel/test-child-process-fork-ref2.js index 8bc7e4c35541b2..c0997c5f358e5d 100644 --- a/test/parallel/test-child-process-fork-ref2.js +++ b/test/parallel/test-child-process-fork-ref2.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); var fork = require('child_process').fork; if (process.argv[2] === 'child') { diff --git a/test/parallel/test-child-process-internal.js b/test/parallel/test-child-process-internal.js index c39dc93293aa8b..c70cbd05d9f840 100644 --- a/test/parallel/test-child-process-internal.js +++ b/test/parallel/test-child-process-internal.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); //messages diff --git a/test/parallel/test-child-process-set-blocking.js b/test/parallel/test-child-process-set-blocking.js index 3f09388265b89a..480dff7114b5bb 100644 --- a/test/parallel/test-child-process-set-blocking.js +++ b/test/parallel/test-child-process-set-blocking.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var ch = require('child_process'); diff --git a/test/parallel/test-child-process-silent.js b/test/parallel/test-child-process-silent.js index 3714d3758d0f22..02ef72b0de3857 100644 --- a/test/parallel/test-child-process-silent.js +++ b/test/parallel/test-child-process-silent.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var childProcess = require('child_process'); diff --git a/test/parallel/test-child-process-spawn-error.js b/test/parallel/test-child-process-spawn-error.js index 1398dac165319c..4eaa45ee7aefb0 100644 --- a/test/parallel/test-child-process-spawn-error.js +++ b/test/parallel/test-child-process-spawn-error.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var fs = require('fs'); var spawn = require('child_process').spawn; var assert = require('assert'); diff --git a/test/parallel/test-child-process-spawnsync-env.js b/test/parallel/test-child-process-spawnsync-env.js index bc7c5aa3dd6c14..d4d7b4dfdc95ab 100644 --- a/test/parallel/test-child-process-spawnsync-env.js +++ b/test/parallel/test-child-process-spawnsync-env.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cp = require('child_process'); diff --git a/test/parallel/test-child-process-spawnsync-input.js b/test/parallel/test-child-process-spawnsync-input.js index 4118b74dc35f6c..66aecfa5428c85 100644 --- a/test/parallel/test-child-process-spawnsync-input.js +++ b/test/parallel/test-child-process-spawnsync-input.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var os = require('os'); var util = require('util'); var spawnSync = require('child_process').spawnSync; diff --git a/test/parallel/test-child-process-spawnsync-timeout.js b/test/parallel/test-child-process-spawnsync-timeout.js index 34c69a1fc597d2..8cf0758cb42fff 100644 --- a/test/parallel/test-child-process-spawnsync-timeout.js +++ b/test/parallel/test-child-process-spawnsync-timeout.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var spawnSync = require('child_process').spawnSync; diff --git a/test/parallel/test-child-process-stdin-ipc.js b/test/parallel/test-child-process-stdin-ipc.js index d2347849dd5b9b..6fc82957e77375 100644 --- a/test/parallel/test-child-process-stdin-ipc.js +++ b/test/parallel/test-child-process-stdin-ipc.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-child-process-stdin.js b/test/parallel/test-child-process-stdin.js index c12b24579375dc..034354e66f4c30 100644 --- a/test/parallel/test-child-process-stdin.js +++ b/test/parallel/test-child-process-stdin.js @@ -59,6 +59,8 @@ cat.on('close', function() { process.on('exit', function() { assert.equal(0, exitStatus); + assert.equal(gotStdoutEOF, true); + assert.equal(gotStderrEOF, true); assert(closed); if (common.isWindows) { assert.equal('hello world\r\n', response); diff --git a/test/parallel/test-child-process-stdio-big-write-end.js b/test/parallel/test-child-process-stdio-big-write-end.js index 5ae85acc54d9dd..0bce30272d1bb4 100644 --- a/test/parallel/test-child-process-stdio-big-write-end.js +++ b/test/parallel/test-child-process-stdio-big-write-end.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var BUFSIZE = 1024; diff --git a/test/parallel/test-child-process-stdio-inherit.js b/test/parallel/test-child-process-stdio-inherit.js index 8cf08a7bd5fa71..409c0af7ca0d31 100644 --- a/test/parallel/test-child-process-stdio-inherit.js +++ b/test/parallel/test-child-process-stdio-inherit.js @@ -31,5 +31,5 @@ function grandparent() { function parent() { // should not immediately exit. - var child = common.spawnCat({ stdio: 'inherit' }); + common.spawnCat({ stdio: 'inherit' }); } diff --git a/test/parallel/test-child-process-stdio.js b/test/parallel/test-child-process-stdio.js index 1ff6e4d914f7ec..d5fe6d43b64d5c 100644 --- a/test/parallel/test-child-process-stdio.js +++ b/test/parallel/test-child-process-stdio.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var spawn = require('child_process').spawn; var options = {stdio: ['pipe']}; var child = common.spawnPwd(options); diff --git a/test/parallel/test-child-process-stdout-flush-exit.js b/test/parallel/test-child-process-stdout-flush-exit.js index 577a33a05082f2..b76a7cb5e5a8e2 100644 --- a/test/parallel/test-child-process-stdout-flush-exit.js +++ b/test/parallel/test-child-process-stdout-flush-exit.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var path = require('path'); // if child process output to console and exit if (process.argv[2] === 'child') { diff --git a/test/parallel/test-child-process-validate-stdio.js b/test/parallel/test-child-process-validate-stdio.js index 289323002da4bd..15fddcc364290a 100644 --- a/test/parallel/test-child-process-validate-stdio.js +++ b/test/parallel/test-child-process-validate-stdio.js @@ -2,7 +2,6 @@ // Flags: --expose_internals var assert = require('assert'); -var common = require('../common'); var _validateStdio = require('internal/child_process')._validateStdio; // should throw if string and not ignore, pipe, or inherit diff --git a/test/parallel/test-cli-eval.js b/test/parallel/test-cli-eval.js index 10a77c4a67b8a4..7f19b21659ca33 100644 --- a/test/parallel/test-cli-eval.js +++ b/test/parallel/test-cli-eval.js @@ -5,11 +5,9 @@ if (module.parent) { process.exit(42); } -var common = require('../common'), - assert = require('assert'), - child = require('child_process'), - nodejs = '"' + process.execPath + '"'; - +var assert = require('assert'); +var child = require('child_process'); +var nodejs = '"' + process.execPath + '"'; // replace \ by / because windows uses backslashes in paths, but they're still // interpreted as the escape character when put between quotes. diff --git a/test/parallel/test-cluster-debug-port.js b/test/parallel/test-cluster-debug-port.js index 1a42850e9b2bc1..cdda8c48fb10b5 100644 --- a/test/parallel/test-cluster-debug-port.js +++ b/test/parallel/test-cluster-debug-port.js @@ -1,5 +1,4 @@ 'use strict'; -const common = require('../common'); const assert = require('assert'); const cluster = require('cluster'); diff --git a/test/parallel/test-cluster-dgram-2.js b/test/parallel/test-cluster-dgram-2.js index 0253cafcf49766..6426e1c224beb7 100644 --- a/test/parallel/test-cluster-dgram-2.js +++ b/test/parallel/test-cluster-dgram-2.js @@ -2,7 +2,6 @@ var NUM_WORKERS = 4; var PACKETS_PER_WORKER = 10; -var assert = require('assert'); var cluster = require('cluster'); var common = require('../common'); var dgram = require('dgram'); diff --git a/test/parallel/test-cluster-eaddrinuse.js b/test/parallel/test-cluster-eaddrinuse.js index 509dbb664e1d5d..b1308a976321ae 100644 --- a/test/parallel/test-cluster-eaddrinuse.js +++ b/test/parallel/test-cluster-eaddrinuse.js @@ -5,7 +5,6 @@ var common = require('../common'); var assert = require('assert'); -var cluster = require('cluster'); var fork = require('child_process').fork; var net = require('net'); diff --git a/test/parallel/test-cluster-fork-env.js b/test/parallel/test-cluster-fork-env.js index 7749e42f608c60..784017b51875a6 100644 --- a/test/parallel/test-cluster-fork-env.js +++ b/test/parallel/test-cluster-fork-env.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-http-pipe.js b/test/parallel/test-cluster-http-pipe.js index 4c6dee347bb8e9..cb9b090f08e801 100644 --- a/test/parallel/test-cluster-http-pipe.js +++ b/test/parallel/test-cluster-http-pipe.js @@ -34,7 +34,6 @@ http.createServer(function(req, res) { res.writeHead(200); res.end('OK'); }).listen(common.PIPE, function() { - var self = this; http.get({ socketPath: common.PIPE, path: '/' }, function(res) { res.resume(); res.on('end', function(err) { diff --git a/test/parallel/test-cluster-net-listen.js b/test/parallel/test-cluster-net-listen.js index 741cacc75897e3..44c35c85e6e4aa 100644 --- a/test/parallel/test-cluster-net-listen.js +++ b/test/parallel/test-cluster-net-listen.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); var net = require('net'); diff --git a/test/parallel/test-cluster-setup-master-argv.js b/test/parallel/test-cluster-setup-master-argv.js index b406c76cbbfe0b..9b2c50a5afb4bc 100644 --- a/test/parallel/test-cluster-setup-master-argv.js +++ b/test/parallel/test-cluster-setup-master-argv.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-setup-master-cumulative.js b/test/parallel/test-cluster-setup-master-cumulative.js index 0376546d286b51..c71eb36b8aaaec 100644 --- a/test/parallel/test-cluster-setup-master-cumulative.js +++ b/test/parallel/test-cluster-setup-master-cumulative.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-setup-master-emit.js b/test/parallel/test-cluster-setup-master-emit.js index 8b463ec97bff45..dd5422ee57ce56 100644 --- a/test/parallel/test-cluster-setup-master-emit.js +++ b/test/parallel/test-cluster-setup-master-emit.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-setup-master-multiple.js b/test/parallel/test-cluster-setup-master-multiple.js index 8ee6d091cd524a..7c68cb81f60b17 100644 --- a/test/parallel/test-cluster-setup-master-multiple.js +++ b/test/parallel/test-cluster-setup-master-multiple.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-setup-master.js b/test/parallel/test-cluster-setup-master.js index c32b3ea6d3b18b..6661e169722f83 100644 --- a/test/parallel/test-cluster-setup-master.js +++ b/test/parallel/test-cluster-setup-master.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-uncaught-exception.js b/test/parallel/test-cluster-uncaught-exception.js index ec42773ef55856..0e61f9cf3bc2c5 100644 --- a/test/parallel/test-cluster-uncaught-exception.js +++ b/test/parallel/test-cluster-uncaught-exception.js @@ -3,7 +3,6 @@ // one that the cluster module installs. // https://github.com/joyent/node/issues/2556 -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); var fork = require('child_process').fork; diff --git a/test/parallel/test-cluster-worker-constructor.js b/test/parallel/test-cluster-worker-constructor.js index e29dc01561903d..653719390558a6 100644 --- a/test/parallel/test-cluster-worker-constructor.js +++ b/test/parallel/test-cluster-worker-constructor.js @@ -2,7 +2,6 @@ // test-cluster-worker-constructor.js // validates correct behavior of the cluster.Worker constructor -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); var worker; diff --git a/test/parallel/test-cluster-worker-death.js b/test/parallel/test-cluster-worker-death.js index 88a0f887cc2cab..2ac83f4b95a3e1 100644 --- a/test/parallel/test-cluster-worker-death.js +++ b/test/parallel/test-cluster-worker-death.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-worker-forced-exit.js b/test/parallel/test-cluster-worker-forced-exit.js index 54d2ce8a478303..452491afa73dba 100644 --- a/test/parallel/test-cluster-worker-forced-exit.js +++ b/test/parallel/test-cluster-worker-forced-exit.js @@ -1,7 +1,6 @@ 'use strict'; var assert = require('assert'); var cluster = require('cluster'); -var net = require('net'); var SENTINEL = 42; diff --git a/test/parallel/test-cluster-worker-init.js b/test/parallel/test-cluster-worker-init.js index 38886af5279a6d..bbce309fab68c9 100644 --- a/test/parallel/test-cluster-worker-init.js +++ b/test/parallel/test-cluster-worker-init.js @@ -3,7 +3,6 @@ // verifies that, when a child process is forked, the cluster.worker // object can receive messages as expected -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); var msg = 'foo'; diff --git a/test/parallel/test-cluster-worker-isconnected.js b/test/parallel/test-cluster-worker-isconnected.js index 4477278e31330a..a540e6f7e1d2fe 100644 --- a/test/parallel/test-cluster-worker-isconnected.js +++ b/test/parallel/test-cluster-worker-isconnected.js @@ -1,7 +1,6 @@ 'use strict'; var cluster = require('cluster'); var assert = require('assert'); -var util = require('util'); if (cluster.isMaster) { var worker = cluster.fork(); diff --git a/test/parallel/test-cluster-worker-isdead.js b/test/parallel/test-cluster-worker-isdead.js index 045a620a9efab7..d9b8f14d82d7df 100644 --- a/test/parallel/test-cluster-worker-isdead.js +++ b/test/parallel/test-cluster-worker-isdead.js @@ -1,7 +1,6 @@ 'use strict'; var cluster = require('cluster'); var assert = require('assert'); -var net = require('net'); if (cluster.isMaster) { var worker = cluster.fork(); diff --git a/test/parallel/test-console-instance.js b/test/parallel/test-console-instance.js index a80c6e57e4b151..fe325645b53678 100644 --- a/test/parallel/test-console-instance.js +++ b/test/parallel/test-console-instance.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Stream = require('stream'); var Console = require('console').Console; diff --git a/test/parallel/test-console-not-call-toString.js b/test/parallel/test-console-not-call-toString.js index 7846dbf2778b9c..12a2a04caf7e76 100644 --- a/test/parallel/test-console-not-call-toString.js +++ b/test/parallel/test-console-not-call-toString.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var func = function() {}; diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js index 982c83851f072a..7a4bea0c6fb161 100644 --- a/test/parallel/test-console.js +++ b/test/parallel/test-console.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); assert.ok(process.stdout.writable); diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index bebc91dc8ed0b1..09af4cfbdbe98a 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -20,7 +20,6 @@ var fs = require('fs'); var path = require('path'); // Test Certificates -var caPem = fs.readFileSync(common.fixturesDir + '/test_ca.pem', 'ascii'); var certPem = fs.readFileSync(common.fixturesDir + '/test_cert.pem', 'ascii'); var certPfx = fs.readFileSync(common.fixturesDir + '/test_cert.pfx'); var keyPem = fs.readFileSync(common.fixturesDir + '/test_key.pem', 'ascii'); diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js index 8286d58d1e44ca..9814b395552e9f 100644 --- a/test/parallel/test-crypto-certificate.js +++ b/test/parallel/test-crypto-certificate.js @@ -11,7 +11,6 @@ var crypto = require('crypto'); crypto.DEFAULT_ENCODING = 'buffer'; var fs = require('fs'); -var path = require('path'); // Test Certificates var spkacValid = fs.readFileSync(common.fixturesDir + '/spkac.valid'); diff --git a/test/parallel/test-crypto-dh-odd-key.js b/test/parallel/test-crypto-dh-odd-key.js index abb4860b238a78..aca6802531ff95 100644 --- a/test/parallel/test-crypto-dh-odd-key.js +++ b/test/parallel/test-crypto-dh-odd-key.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js index dfb912c0a4c9f1..61049fc382051c 100644 --- a/test/parallel/test-crypto-dh.js +++ b/test/parallel/test-crypto-dh.js @@ -166,7 +166,7 @@ var ecdh3 = crypto.createECDH('secp256k1'); var key3 = ecdh3.generateKeys(); assert.throws(function() { - var secret3 = ecdh2.computeSecret(key3, 'binary', 'buffer'); + ecdh2.computeSecret(key3, 'binary', 'buffer'); }); // ECDH should allow .setPrivateKey()/.setPublicKey() diff --git a/test/parallel/test-crypto-verify-failure.js b/test/parallel/test-crypto-verify-failure.js index f315aed1a9f139..24e5ab7516103c 100644 --- a/test/parallel/test-crypto-verify-failure.js +++ b/test/parallel/test-crypto-verify-failure.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); @@ -20,8 +19,6 @@ var options = { cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem') }; -var canSend = true; - var server = tls.Server(options, function(socket) { setImmediate(function() { console.log('sending'); @@ -32,17 +29,14 @@ var server = tls.Server(options, function(socket) { }); }); -var client; - function verify() { console.log('verify'); - var verified = crypto.createVerify('RSA-SHA1') - .update('Test') - .verify(certPem, 'asdfasdfas', 'base64'); + crypto.createVerify('RSA-SHA1').update('Test') + .verify(certPem, 'asdfasdfas', 'base64'); } server.listen(common.PORT, function() { - client = tls.connect({ + tls.connect({ port: common.PORT, rejectUnauthorized: false }, function() { diff --git a/test/parallel/test-debug-signal-cluster.js b/test/parallel/test-debug-signal-cluster.js index 6572ef50afe845..7a950458b87271 100644 --- a/test/parallel/test-debug-signal-cluster.js +++ b/test/parallel/test-debug-signal-cluster.js @@ -10,7 +10,6 @@ var options = { stdio: ['inherit', 'inherit', 'pipe', 'ipc'] }; var child = spawn(process.execPath, args, options); var outputLines = []; -var outputTimerId; var waitingForDebuggers = false; var pids = null; diff --git a/test/parallel/test-delayed-require.js b/test/parallel/test-delayed-require.js index 5fa82f236c1dd9..515bc1fe56b67b 100644 --- a/test/parallel/test-delayed-require.js +++ b/test/parallel/test-delayed-require.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var a; diff --git a/test/parallel/test-dgram-bind.js b/test/parallel/test-dgram-bind.js index 6d35534cb5eb56..79ff9723538966 100644 --- a/test/parallel/test-dgram-bind.js +++ b/test/parallel/test-dgram-bind.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-bytes-length.js b/test/parallel/test-dgram-bytes-length.js index 9f8c39eb04daaf..7cf138490456a9 100644 --- a/test/parallel/test-dgram-bytes-length.js +++ b/test/parallel/test-dgram-bytes-length.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-empty-packet.js b/test/parallel/test-dgram-empty-packet.js index ba6faa62d86cec..cc82cb875441be 100644 --- a/test/parallel/test-dgram-empty-packet.js +++ b/test/parallel/test-dgram-empty-packet.js @@ -1,8 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); - -var fs = require('fs'); var dgram = require('dgram'); var callbacks = 0; var client; diff --git a/test/parallel/test-dgram-error-message-address.js b/test/parallel/test-dgram-error-message-address.js index eca2ccce4f1b65..fd4f5a269275ed 100644 --- a/test/parallel/test-dgram-error-message-address.js +++ b/test/parallel/test-dgram-error-message-address.js @@ -20,7 +20,6 @@ socket_ipv4.bind(common.PORT, '1.1.1.1'); // IPv6 Test var socket_ipv6 = dgram.createSocket('udp6'); -var family_ipv6 = 'IPv6'; socket_ipv6.on('listening', assert.fail); diff --git a/test/parallel/test-dgram-listen-after-bind.js b/test/parallel/test-dgram-listen-after-bind.js index 2aac7ae9cf7588..85cef2099409a8 100644 --- a/test/parallel/test-dgram-listen-after-bind.js +++ b/test/parallel/test-dgram-listen-after-bind.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-pingpong.js b/test/parallel/test-dgram-pingpong.js index 29ab92757bd817..151b9e899f8d4a 100644 --- a/test/parallel/test-dgram-pingpong.js +++ b/test/parallel/test-dgram-pingpong.js @@ -57,6 +57,7 @@ function pingPongTest(port, host) { client.on('close', function() { console.log('client has closed, closing server'); + assert.equal(sent_final_ping, true); assert.equal(N, count); tests_run += 1; server.close(); diff --git a/test/parallel/test-dgram-ref.js b/test/parallel/test-dgram-ref.js index d689a45e36dfa2..5883d6252c6f9a 100644 --- a/test/parallel/test-dgram-ref.js +++ b/test/parallel/test-dgram-ref.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var dgram = require('dgram'); // should not hang, see #1282 diff --git a/test/parallel/test-dgram-regress-4496.js b/test/parallel/test-dgram-regress-4496.js index fcb8d026bc547e..a37c075e2ecf30 100644 --- a/test/parallel/test-dgram-regress-4496.js +++ b/test/parallel/test-dgram-regress-4496.js @@ -1,7 +1,6 @@ 'use strict'; // Remove this test once we support sending strings. -var common = require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-send-bad-arguments.js b/test/parallel/test-dgram-send-bad-arguments.js index ccd10e00555384..ce98b318066f74 100644 --- a/test/parallel/test-dgram-send-bad-arguments.js +++ b/test/parallel/test-dgram-send-bad-arguments.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-send-callback-buffer-length.js b/test/parallel/test-dgram-send-callback-buffer-length.js index a34c5e2eb6b8db..80c2d23e42ef55 100644 --- a/test/parallel/test-dgram-send-callback-buffer-length.js +++ b/test/parallel/test-dgram-send-callback-buffer-length.js @@ -2,9 +2,7 @@ var common = require('../common'); var assert = require('assert'); -var fs = require('fs'); var dgram = require('dgram'); -var callbacks = 0; var client, timer, buf, len, offset; diff --git a/test/parallel/test-dgram-send-empty-buffer.js b/test/parallel/test-dgram-send-empty-buffer.js index 11f3d38d2ed046..9b9b3c98bc6cba 100644 --- a/test/parallel/test-dgram-send-empty-buffer.js +++ b/test/parallel/test-dgram-send-empty-buffer.js @@ -1,10 +1,6 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); - -var fs = require('fs'); var dgram = require('dgram'); -var callbacks = 0; var client, timer, buf; if (process.platform === 'darwin') { diff --git a/test/parallel/test-dgram-udp4.js b/test/parallel/test-dgram-udp4.js index f81dec398f72d1..abd20e66b6a359 100644 --- a/test/parallel/test-dgram-udp4.js +++ b/test/parallel/test-dgram-udp4.js @@ -2,8 +2,7 @@ var common = require('../common'); var assert = require('assert'); -var fs = require('fs'), - dgram = require('dgram'), server, client, +var dgram = require('dgram'), server, client, server_port = common.PORT, message_to_send = 'A message to send', timer; diff --git a/test/parallel/test-dgram-unref.js b/test/parallel/test-dgram-unref.js index 2add3d28c49760..2a2659834e48a9 100644 --- a/test/parallel/test-dgram-unref.js +++ b/test/parallel/test-dgram-unref.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dh-padding.js b/test/parallel/test-dh-padding.js index ef6ea0fd4d7cfd..009800f08800b7 100644 --- a/test/parallel/test-dh-padding.js +++ b/test/parallel/test-dh-padding.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); try { @@ -13,7 +12,6 @@ var prime = 'c51f7bf8f0e1cf899243cdf408b1bc7c09c010e33ef7f3fbe5bd5feaf906113b'; var apub = '6fe9f37037d8d017f908378c1ee04fe60e1cd3668bfc5075fac55c2f7153dd84'; var bpub = '31d83e167fdf956c9dae6b980140577a9f8868acbfcbdc19113e58bfb9223abc'; var apriv = '4fbfd4661f9181bbf574537b1a78adf473e8e771eef13c605e963c0f3094b697'; -var secret = '25616eed33f1af7975bbd0a8071d98a014f538b243bef90d76c08e81a0b3c500'; var p = crypto.createDiffieHellman(prime, 'hex'); diff --git a/test/parallel/test-dns-cares-domains.js b/test/parallel/test-dns-cares-domains.js index cb651c5f5afb86..7adcb4d3ea0cba 100644 --- a/test/parallel/test-dns-cares-domains.js +++ b/test/parallel/test-dns-cares-domains.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var dns = require('dns'); var domain = require('domain'); diff --git a/test/parallel/test-dns-lookup-cb-error.js b/test/parallel/test-dns-lookup-cb-error.js index 330dfb5d57092a..786bf40bbaf525 100644 --- a/test/parallel/test-dns-lookup-cb-error.js +++ b/test/parallel/test-dns-lookup-cb-error.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cares = process.binding('cares_wrap'); diff --git a/test/parallel/test-dns-regress-7070.js b/test/parallel/test-dns-regress-7070.js index 1fbd7f07a9d520..d6c8490009cd6b 100644 --- a/test/parallel/test-dns-regress-7070.js +++ b/test/parallel/test-dns-regress-7070.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var dns = require('dns'); diff --git a/test/parallel/test-dns.js b/test/parallel/test-dns.js index abc7edbf598097..29b588230e49e1 100644 --- a/test/parallel/test-dns.js +++ b/test/parallel/test-dns.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var dns = require('dns'); diff --git a/test/parallel/test-domain-exit-dispose-again.js b/test/parallel/test-domain-exit-dispose-again.js index d7046481d112ea..2532ab4473f040 100644 --- a/test/parallel/test-domain-exit-dispose-again.js +++ b/test/parallel/test-domain-exit-dispose-again.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var domain = require('domain'); var disposalFailed = false; diff --git a/test/parallel/test-domain-exit-dispose.js b/test/parallel/test-domain-exit-dispose.js index 90e7210ce21aea..6a71098d09a6f2 100644 --- a/test/parallel/test-domain-exit-dispose.js +++ b/test/parallel/test-domain-exit-dispose.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var domain = require('domain'); var disposalFailed = false; diff --git a/test/parallel/test-domain-from-timer.js b/test/parallel/test-domain-from-timer.js index 93661b419b0bbf..ad224dc0774bb6 100644 --- a/test/parallel/test-domain-from-timer.js +++ b/test/parallel/test-domain-from-timer.js @@ -1,7 +1,6 @@ 'use strict'; // Simple tests of most basic domain functionality. -var common = require('../common'); var assert = require('assert'); // timeouts call the callback directly from cc, so need to make sure the diff --git a/test/parallel/test-domain-http-server.js b/test/parallel/test-domain-http-server.js index 99dbf413e3a4f8..37dbc30f4234d7 100644 --- a/test/parallel/test-domain-http-server.js +++ b/test/parallel/test-domain-http-server.js @@ -9,7 +9,6 @@ objects.baz.asdf = objects; var serverCaught = 0; var clientCaught = 0; -var disposeEmit = 0; var server = http.createServer(function(req, res) { var dom = domain.create(); diff --git a/test/parallel/test-domain-implicit-fs.js b/test/parallel/test-domain-implicit-fs.js index fd21dcafe0858f..27df3f4d99ef47 100644 --- a/test/parallel/test-domain-implicit-fs.js +++ b/test/parallel/test-domain-implicit-fs.js @@ -1,15 +1,12 @@ 'use strict'; // Simple tests of most basic domain functionality. -var common = require('../common'); var assert = require('assert'); var domain = require('domain'); -var events = require('events'); var caught = 0; var expectCaught = 1; var d = new domain.Domain(); -var e = new events.EventEmitter(); d.on('error', function(er) { console.error('caught', er); diff --git a/test/parallel/test-domain-multi.js b/test/parallel/test-domain-multi.js index e5f9f6748b178e..ac01d66deee544 100644 --- a/test/parallel/test-domain-multi.js +++ b/test/parallel/test-domain-multi.js @@ -4,7 +4,6 @@ var common = require('../common'); var assert = require('assert'); var domain = require('domain'); -var events = require('events'); var caughtA = false; var caughtB = false; diff --git a/test/parallel/test-domain-nested-throw.js b/test/parallel/test-domain-nested-throw.js index 0fba3001b543fb..da9388871a4a56 100644 --- a/test/parallel/test-domain-nested-throw.js +++ b/test/parallel/test-domain-nested-throw.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var domain = require('domain'); diff --git a/test/parallel/test-domain-stack.js b/test/parallel/test-domain-stack.js index f9b5648a6619a7..e34506d8cc24b9 100644 --- a/test/parallel/test-domain-stack.js +++ b/test/parallel/test-domain-stack.js @@ -1,10 +1,7 @@ 'use strict'; // Make sure that the domain stack doesn't get out of hand. -var common = require('../common'); -var assert = require('assert'); var domain = require('domain'); -var events = require('events'); var a = domain.create(); a.name = 'a'; diff --git a/test/parallel/test-domain-timers.js b/test/parallel/test-domain-timers.js index 7530c9edba40b1..ff391e51056a2b 100644 --- a/test/parallel/test-domain-timers.js +++ b/test/parallel/test-domain-timers.js @@ -1,7 +1,6 @@ 'use strict'; var domain = require('domain'); var assert = require('assert'); -var common = require('../common'); var timeout_err, timeout, immediate_err; diff --git a/test/parallel/test-domain.js b/test/parallel/test-domain.js index 918e3288e8dc91..85b544d199f037 100644 --- a/test/parallel/test-domain.js +++ b/test/parallel/test-domain.js @@ -1,7 +1,6 @@ 'use strict'; // Simple tests of most basic domain functionality. -var common = require('../common'); var assert = require('assert'); var domain = require('domain'); var events = require('events'); diff --git a/test/parallel/test-eval-require.js b/test/parallel/test-eval-require.js index f966b5a98c80ba..4e2ddf42b6dffa 100644 --- a/test/parallel/test-eval-require.js +++ b/test/parallel/test-eval-require.js @@ -2,8 +2,6 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var path = require('path'); -var fs = require('fs'); var options = { cwd: common.fixturesDir diff --git a/test/parallel/test-eval.js b/test/parallel/test-eval.js index d3a83fbd5a7060..59b5d1a240861a 100644 --- a/test/parallel/test-eval.js +++ b/test/parallel/test-eval.js @@ -10,7 +10,7 @@ var error_count = 0; var cmd = ['"' + process.execPath + '"', '-e', '"console.error(process.argv)"', 'foo', 'bar'].join(' '); var expected = util.format([process.execPath, 'foo', 'bar']) + '\n'; -var child = exec(cmd, function(err, stdout, stderr) { +exec(cmd, function(err, stdout, stderr) { if (err) { console.log(err.toString()); ++error_count; diff --git a/test/parallel/test-event-emitter-add-listeners.js b/test/parallel/test-event-emitter-add-listeners.js index cc30fd24add340..fff1f95fa82a94 100644 --- a/test/parallel/test-event-emitter-add-listeners.js +++ b/test/parallel/test-event-emitter-add-listeners.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-check-listener-leaks.js b/test/parallel/test-event-emitter-check-listener-leaks.js index 90f686b5422c43..dbf8394c7e94ac 100644 --- a/test/parallel/test-event-emitter-check-listener-leaks.js +++ b/test/parallel/test-event-emitter-check-listener-leaks.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-get-max-listeners.js b/test/parallel/test-event-emitter-get-max-listeners.js index 43a14db0cca362..33dbd62a546caa 100644 --- a/test/parallel/test-event-emitter-get-max-listeners.js +++ b/test/parallel/test-event-emitter-get-max-listeners.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var EventEmitter = require('events'); diff --git a/test/parallel/test-event-emitter-listener-count.js b/test/parallel/test-event-emitter-listener-count.js index c5b75c819d17f9..e53b8991f1fc2b 100644 --- a/test/parallel/test-event-emitter-listener-count.js +++ b/test/parallel/test-event-emitter-listener-count.js @@ -1,6 +1,5 @@ 'use strict'; -const common = require('../common'); const assert = require('assert'); const EventEmitter = require('events'); diff --git a/test/parallel/test-event-emitter-listeners-side-effects.js b/test/parallel/test-event-emitter-listeners-side-effects.js index 23076128eddfc1..dbea53912cb9ea 100644 --- a/test/parallel/test-event-emitter-listeners-side-effects.js +++ b/test/parallel/test-event-emitter-listeners-side-effects.js @@ -1,9 +1,5 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var events = require('events'); - var EventEmitter = require('events').EventEmitter; var assert = require('assert'); diff --git a/test/parallel/test-event-emitter-listeners.js b/test/parallel/test-event-emitter-listeners.js index 48a60609e7be88..201518156b3590 100644 --- a/test/parallel/test-event-emitter-listeners.js +++ b/test/parallel/test-event-emitter-listeners.js @@ -1,6 +1,5 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-max-listeners.js b/test/parallel/test-event-emitter-max-listeners.js index 5e754698d0a018..4722d7f7d1fe07 100644 --- a/test/parallel/test-event-emitter-max-listeners.js +++ b/test/parallel/test-event-emitter-max-listeners.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-method-names.js b/test/parallel/test-event-emitter-method-names.js index a260aa779855aa..7fe24a3ddbacc8 100644 --- a/test/parallel/test-event-emitter-method-names.js +++ b/test/parallel/test-event-emitter-method-names.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-modify-in-emit.js b/test/parallel/test-event-emitter-modify-in-emit.js index 85845cc4443b32..ce0fabf77445f0 100644 --- a/test/parallel/test-event-emitter-modify-in-emit.js +++ b/test/parallel/test-event-emitter-modify-in-emit.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-no-error-provided-to-error-event.js b/test/parallel/test-event-emitter-no-error-provided-to-error-event.js index e85361475f894e..adba3152954c4b 100644 --- a/test/parallel/test-event-emitter-no-error-provided-to-error-event.js +++ b/test/parallel/test-event-emitter-no-error-provided-to-error-event.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); var domain = require('domain'); diff --git a/test/parallel/test-event-emitter-num-args.js b/test/parallel/test-event-emitter-num-args.js index 6c403cd2f294ae..19feae6894c3ae 100644 --- a/test/parallel/test-event-emitter-num-args.js +++ b/test/parallel/test-event-emitter-num-args.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-once.js b/test/parallel/test-event-emitter-once.js index 1085e7942a59bf..23003180fe911a 100644 --- a/test/parallel/test-event-emitter-once.js +++ b/test/parallel/test-event-emitter-once.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-remove-listeners.js b/test/parallel/test-event-emitter-remove-listeners.js index 409ccbebe25b86..22085167947cb9 100644 --- a/test/parallel/test-event-emitter-remove-listeners.js +++ b/test/parallel/test-event-emitter-remove-listeners.js @@ -15,11 +15,6 @@ function listener2() { count++; } -function listener3() { - console.log('listener3'); - count++; -} - function remove1() { assert(0); } diff --git a/test/parallel/test-event-emitter-set-max-listeners-side-effects.js b/test/parallel/test-event-emitter-set-max-listeners-side-effects.js index f09f130ab489ed..22a46e225715a0 100644 --- a/test/parallel/test-event-emitter-set-max-listeners-side-effects.js +++ b/test/parallel/test-event-emitter-set-max-listeners-side-effects.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-subclass.js b/test/parallel/test-event-emitter-subclass.js index fe915be34efc2b..e9fe068ccab7ae 100644 --- a/test/parallel/test-event-emitter-subclass.js +++ b/test/parallel/test-event-emitter-subclass.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var EventEmitter = require('events').EventEmitter; var util = require('util'); diff --git a/test/parallel/test-exception-handler.js b/test/parallel/test-exception-handler.js index 9cc8106ea6f80a..701184fe3f1ae6 100644 --- a/test/parallel/test-exception-handler.js +++ b/test/parallel/test-exception-handler.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var MESSAGE = 'catch me if you can'; diff --git a/test/parallel/test-exception-handler2.js b/test/parallel/test-exception-handler2.js index 58e84ad21ba4ee..88464e6e06fa5f 100644 --- a/test/parallel/test-exception-handler2.js +++ b/test/parallel/test-exception-handler2.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); process.on('uncaughtException', function(err) { diff --git a/test/parallel/test-exec-max-buffer.js b/test/parallel/test-exec-max-buffer.js index 5cae35b69f95d5..37cbd495d54508 100644 --- a/test/parallel/test-exec-max-buffer.js +++ b/test/parallel/test-exec-max-buffer.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var exec = require('child_process').exec; var assert = require('assert'); diff --git a/test/parallel/test-file-write-stream2.js b/test/parallel/test-file-write-stream2.js index 0044548b736df0..c37293dcdfd747 100644 --- a/test/parallel/test-file-write-stream2.js +++ b/test/parallel/test-file-write-stream2.js @@ -1,11 +1,8 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); - var path = require('path'); var fs = require('fs'); -var util = require('util'); - var filepath = path.join(common.tmpDir, 'write.txt'); var file; diff --git a/test/parallel/test-file-write-stream3.js b/test/parallel/test-file-write-stream3.js index 1a88faa01fb8a6..ef4bb4eebdba3b 100644 --- a/test/parallel/test-file-write-stream3.js +++ b/test/parallel/test-file-write-stream3.js @@ -1,11 +1,8 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); - -var path = require('path'), - fs = require('fs'), - util = require('util'); - +var path = require('path'); +var fs = require('fs'); var filepath = path.join(common.tmpDir, 'write_pos.txt'); @@ -125,7 +122,7 @@ function run_test_2() { function run_test_3() { - var file, buffer, options; + var file, options; var data = '\u2026\u2026', // 3 bytes * 2 = 6 bytes in UTF-8 fileData; @@ -168,10 +165,7 @@ function run_test_3() { function run_test_4() { - var file, options; - - options = { start: -5, - flags: 'r+' }; + var options = { start: -5, flags: 'r+' }; // Error: start must be >= zero assert.throws( diff --git a/test/parallel/test-fs-exists.js b/test/parallel/test-fs-exists.js index fcbd729a5ed850..4661446fe14ded 100644 --- a/test/parallel/test-fs-exists.js +++ b/test/parallel/test-fs-exists.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); var f = __filename; diff --git a/test/parallel/test-fs-make-callback.js b/test/parallel/test-fs-make-callback.js index a15a16404df003..2700ab23898b6d 100644 --- a/test/parallel/test-fs-make-callback.js +++ b/test/parallel/test-fs-make-callback.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-null-bytes.js b/test/parallel/test-fs-null-bytes.js index 77228521e6fc9d..4afd4a5b9517a1 100644 --- a/test/parallel/test-fs-null-bytes.js +++ b/test/parallel/test-fs-null-bytes.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-open-flags.js b/test/parallel/test-fs-open-flags.js index c7d53117d587fc..2aa0f0b72874da 100644 --- a/test/parallel/test-fs-open-flags.js +++ b/test/parallel/test-fs-open-flags.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var constants = require('constants'); @@ -7,14 +6,9 @@ var fs = require('fs'); var O_APPEND = constants.O_APPEND || 0; var O_CREAT = constants.O_CREAT || 0; -var O_DIRECTORY = constants.O_DIRECTORY || 0; var O_EXCL = constants.O_EXCL || 0; -var O_NOCTTY = constants.O_NOCTTY || 0; -var O_NOFOLLOW = constants.O_NOFOLLOW || 0; var O_RDONLY = constants.O_RDONLY || 0; var O_RDWR = constants.O_RDWR || 0; -var O_SYMLINK = constants.O_SYMLINK || 0; -var O_SYNC = constants.O_SYNC || 0; var O_TRUNC = constants.O_TRUNC || 0; var O_WRONLY = constants.O_WRONLY || 0; diff --git a/test/parallel/test-fs-open.js b/test/parallel/test-fs-open.js index 59b605841b4440..83519930a767e2 100644 --- a/test/parallel/test-fs-open.js +++ b/test/parallel/test-fs-open.js @@ -1,6 +1,4 @@ 'use strict'; -var constants = require('constants'); -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-read-file-sync-hostname.js b/test/parallel/test-fs-read-file-sync-hostname.js index c5c5264c0dde3b..1c68ea03d1bcb0 100644 --- a/test/parallel/test-fs-read-file-sync-hostname.js +++ b/test/parallel/test-fs-read-file-sync-hostname.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-readfile-zero-byte-liar.js b/test/parallel/test-fs-readfile-zero-byte-liar.js index 2c9c6e3db9a584..01b7d73f930a0c 100644 --- a/test/parallel/test-fs-readfile-zero-byte-liar.js +++ b/test/parallel/test-fs-readfile-zero-byte-liar.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-stat.js b/test/parallel/test-fs-stat.js index 123d6608b4bb4f..305b2ed14069dd 100644 --- a/test/parallel/test-fs-stat.js +++ b/test/parallel/test-fs-stat.js @@ -1,5 +1,4 @@ /* eslint-disable strict */ -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); var got_error = false; diff --git a/test/parallel/test-fs-sync-fd-leak.js b/test/parallel/test-fs-sync-fd-leak.js index 5f2b63125a1d0f..c26115053ff1ba 100644 --- a/test/parallel/test-fs-sync-fd-leak.js +++ b/test/parallel/test-fs-sync-fd-leak.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-utimes.js b/test/parallel/test-fs-utimes.js index 292636b1b69108..e33d944b2cdc2b 100644 --- a/test/parallel/test-fs-utimes.js +++ b/test/parallel/test-fs-utimes.js @@ -48,7 +48,7 @@ function expect_ok(syscall, resource, err, atime, mtime) { // would be even better though (node doesn't have such functionality yet) function runTest(atime, mtime, callback) { - var fd, err; + var fd; // // test synchronized code paths, these functions throw on failure // diff --git a/test/parallel/test-fs-write-file-sync.js b/test/parallel/test-fs-write-file-sync.js index 37373404daf20e..6ce7ff41ba0086 100644 --- a/test/parallel/test-fs-write-file-sync.js +++ b/test/parallel/test-fs-write-file-sync.js @@ -14,9 +14,6 @@ fs.openSync = openSync; fs._closeSync = fs.closeSync; fs.closeSync = closeSync; -// Reset the umask for testing -var mask = process.umask(0o000); - // On Windows chmod is only able to manipulate read-only bit. Test if creating // the file in read-only mode works. if (common.isWindows) { diff --git a/test/parallel/test-fs-write-no-fd.js b/test/parallel/test-fs-write-no-fd.js index 5b38ce6ba814c4..64ad41b359f4aa 100644 --- a/test/parallel/test-fs-write-no-fd.js +++ b/test/parallel/test-fs-write-no-fd.js @@ -1,5 +1,4 @@ 'use strict'; -const common = require('../common'); const fs = require('fs'); const assert = require('assert'); diff --git a/test/parallel/test-handle-wrap-close-abort.js b/test/parallel/test-handle-wrap-close-abort.js index 8e2388fa84d809..b5b3ee6977ddb9 100644 --- a/test/parallel/test-handle-wrap-close-abort.js +++ b/test/parallel/test-handle-wrap-close-abort.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); - process.on('uncaughtException', function() { }); setTimeout(function() { diff --git a/test/parallel/test-http-1.0-keep-alive.js b/test/parallel/test-http-1.0-keep-alive.js index eac0fe51e2206a..516a02031ef247 100644 --- a/test/parallel/test-http-1.0-keep-alive.js +++ b/test/parallel/test-http-1.0-keep-alive.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var net = require('net'); diff --git a/test/parallel/test-http-304.js b/test/parallel/test-http-304.js index e206f5bb70a3e1..662395f351874d 100644 --- a/test/parallel/test-http-304.js +++ b/test/parallel/test-http-304.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var childProcess = require('child_process'); diff --git a/test/parallel/test-http-abort-client.js b/test/parallel/test-http-abort-client.js index e24ded11d1a7ec..4d7a32c1dfb26b 100644 --- a/test/parallel/test-http-abort-client.js +++ b/test/parallel/test-http-abort-client.js @@ -14,7 +14,7 @@ var server = http.Server(function(req, res) { var responseClose = false; server.listen(common.PORT, function() { - var client = http.get({ + http.get({ port: common.PORT, headers: { connection: 'keep-alive' } diff --git a/test/parallel/test-http-after-connect.js b/test/parallel/test-http-after-connect.js index 19011fcbcb4fc4..f363ed4c0ee814 100644 --- a/test/parallel/test-http-after-connect.js +++ b/test/parallel/test-http-after-connect.js @@ -45,7 +45,7 @@ server.listen(common.PORT, function() { }); function doRequest(i) { - var req = http.get({ + http.get({ port: common.PORT, path: '/request' + i }, function(res) { diff --git a/test/parallel/test-http-agent-false.js b/test/parallel/test-http-agent-false.js index ad8de89f2038e9..f663d72c7251ad 100644 --- a/test/parallel/test-http-agent-false.js +++ b/test/parallel/test-http-agent-false.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var http = require('http'); diff --git a/test/parallel/test-http-agent-getname.js b/test/parallel/test-http-agent-getname.js index d8d30a8ddbc25c..ec0dbdfa4b6c2a 100644 --- a/test/parallel/test-http-agent-getname.js +++ b/test/parallel/test-http-agent-getname.js @@ -2,7 +2,6 @@ var assert = require('assert'); var http = require('http'); -var common = require('../common'); var agent = new http.Agent(); diff --git a/test/parallel/test-http-agent-keepalive.js b/test/parallel/test-http-agent-keepalive.js index ef9553c8316841..64637f6bcabaec 100644 --- a/test/parallel/test-http-agent-keepalive.js +++ b/test/parallel/test-http-agent-keepalive.js @@ -3,7 +3,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); var Agent = require('_http_agent').Agent; -var EventEmitter = require('events').EventEmitter; var agent = new Agent({ keepAlive: true, diff --git a/test/parallel/test-http-agent-null.js b/test/parallel/test-http-agent-null.js index e118738f664083..29961ff3a5e84b 100644 --- a/test/parallel/test-http-agent-null.js +++ b/test/parallel/test-http-agent-null.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); -var net = require('net'); var request = 0; var response = 0; diff --git a/test/parallel/test-http-buffer-sanity.js b/test/parallel/test-http-buffer-sanity.js index 4b120311d7dac9..98ce0f75b916a8 100644 --- a/test/parallel/test-http-buffer-sanity.js +++ b/test/parallel/test-http-buffer-sanity.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); -var util = require('util'); var bufferSize = 5 * 1024 * 1024; var measuredSize = 0; diff --git a/test/parallel/test-http-byteswritten.js b/test/parallel/test-http-byteswritten.js index 974f446dd436b4..fdc407aec667ba 100644 --- a/test/parallel/test-http-byteswritten.js +++ b/test/parallel/test-http-byteswritten.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var fs = require('fs'); var http = require('http'); var body = 'hello world\n'; diff --git a/test/parallel/test-http-client-abort2.js b/test/parallel/test-http-client-abort2.js index 3f7ae98fa25820..477d12b25827b2 100644 --- a/test/parallel/test-http-client-abort2.js +++ b/test/parallel/test-http-client-abort2.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var server = http.createServer(function(req, res) { diff --git a/test/parallel/test-http-client-encoding.js b/test/parallel/test-http-client-encoding.js index dd696f4dff608a..d99878140fc48b 100644 --- a/test/parallel/test-http-client-encoding.js +++ b/test/parallel/test-http-client-encoding.js @@ -1,7 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); - var http = require('http'); http.createServer(function(req, res) { diff --git a/test/parallel/test-http-client-pipe-end.js b/test/parallel/test-http-client-pipe-end.js index d794aae446c4fa..eaf3bb7332d63d 100644 --- a/test/parallel/test-http-client-pipe-end.js +++ b/test/parallel/test-http-client-pipe-end.js @@ -2,7 +2,6 @@ // see https://github.com/joyent/node/issues/3257 var common = require('../common'); -var assert = require('assert'); var http = require('http'); var server = http.createServer(function(req, res) { diff --git a/test/parallel/test-http-client-readable.js b/test/parallel/test-http-client-readable.js index ba9fdd658c3864..8a0b06d1daa015 100644 --- a/test/parallel/test-http-client-readable.js +++ b/test/parallel/test-http-client-readable.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var http = require('http'); var util = require('util'); diff --git a/test/parallel/test-http-client-unescaped-path.js b/test/parallel/test-http-client-unescaped-path.js index 1536916ae9b49c..b569eeb3e30027 100644 --- a/test/parallel/test-http-client-unescaped-path.js +++ b/test/parallel/test-http-client-unescaped-path.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var http = require('http'); diff --git a/test/parallel/test-http-default-port.js b/test/parallel/test-http-default-port.js index 457424ecfa9397..e403b401fb603f 100644 --- a/test/parallel/test-http-default-port.js +++ b/test/parallel/test-http-default-port.js @@ -57,7 +57,7 @@ if (common.hasCrypto) { res.end('ok'); this.close(); }).listen(SSLPORT, function() { - var req = https.get({ + https.get({ host: 'localhost', rejectUnauthorized: false, headers: { diff --git a/test/parallel/test-http-destroyed-socket-write2.js b/test/parallel/test-http-destroyed-socket-write2.js index 5bbb3bbc946f7d..9065939ccbd798 100644 --- a/test/parallel/test-http-destroyed-socket-write2.js +++ b/test/parallel/test-http-destroyed-socket-write2.js @@ -6,7 +6,6 @@ var assert = require('assert'); // where the server has ended the socket. var http = require('http'); -var net = require('net'); var server = http.createServer(function(req, res) { setImmediate(function() { res.destroy(); diff --git a/test/parallel/test-http-eof-on-connect.js b/test/parallel/test-http-eof-on-connect.js index e676643bab4911..fc7dd1d9fe88ce 100644 --- a/test/parallel/test-http-eof-on-connect.js +++ b/test/parallel/test-http-eof-on-connect.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var net = require('net'); var http = require('http'); diff --git a/test/parallel/test-http-exceptions.js b/test/parallel/test-http-exceptions.js index dc2d5583ddbaf9..922dc2095714be 100644 --- a/test/parallel/test-http-exceptions.js +++ b/test/parallel/test-http-exceptions.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var server = http.createServer(function(req, res) { @@ -11,9 +10,8 @@ var server = http.createServer(function(req, res) { }); server.listen(common.PORT, function() { - var req; for (var i = 0; i < 4; i += 1) { - req = http.get({ port: common.PORT, path: '/busy/' + i }); + http.get({ port: common.PORT, path: '/busy/' + i }); } }); diff --git a/test/parallel/test-http-flush.js b/test/parallel/test-http-flush.js index cac1caf752bee6..8dc7ba7418dc88 100644 --- a/test/parallel/test-http-flush.js +++ b/test/parallel/test-http-flush.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); http.createServer(function(req, res) { diff --git a/test/parallel/test-http-head-request.js b/test/parallel/test-http-head-request.js index 5a6f90507cf303..b605f0b6ed1686 100644 --- a/test/parallel/test-http-head-request.js +++ b/test/parallel/test-http-head-request.js @@ -2,8 +2,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); -var util = require('util'); - var body = 'hello world\n'; var id = 0; diff --git a/test/parallel/test-http-header-response-splitting.js b/test/parallel/test-http-header-response-splitting.js index b499ae33d157cc..e4b367e11a8ca4 100644 --- a/test/parallel/test-http-header-response-splitting.js +++ b/test/parallel/test-http-header-response-splitting.js @@ -32,7 +32,7 @@ var server = http.createServer(function(req, res) { server.listen(common.PORT, function() { for (var i = 0; i < 5; i++) { - var req = http.get({ port: common.PORT, path: '/' }, function(res) { + http.get({ port: common.PORT, path: '/' }, function(res) { assert.strictEqual(res.headers.test, 'foo invalid: bar'); assert.strictEqual(res.headers.invalid, undefined); responses++; diff --git a/test/parallel/test-http-incoming-pipelined-socket-destroy.js b/test/parallel/test-http-incoming-pipelined-socket-destroy.js index 21cd3e69dfd746..1e5a910424d737 100644 --- a/test/parallel/test-http-incoming-pipelined-socket-destroy.js +++ b/test/parallel/test-http-incoming-pipelined-socket-destroy.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var net = require('net'); diff --git a/test/parallel/test-http-keep-alive-close-on-header.js b/test/parallel/test-http-keep-alive-close-on-header.js index 9ed6077b943aa8..83a0d0684cf637 100644 --- a/test/parallel/test-http-keep-alive-close-on-header.js +++ b/test/parallel/test-http-keep-alive-close-on-header.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); -var util = require('util'); var body = 'hello world\n'; var headers = {'connection': 'keep-alive'}; diff --git a/test/parallel/test-http-keep-alive.js b/test/parallel/test-http-keep-alive.js index f89f7698c46ebd..0d30bbe1da3069 100644 --- a/test/parallel/test-http-keep-alive.js +++ b/test/parallel/test-http-keep-alive.js @@ -11,7 +11,6 @@ var server = http.createServer(function(req, res) { res.end(); }); -var connectCount = 0; var agent = new http.Agent({maxSockets: 1}); var headers = {'connection': 'keep-alive'}; var name = agent.getName({ port: common.PORT }); diff --git a/test/parallel/test-http-legacy.js b/test/parallel/test-http-legacy.js index 039037114d37d4..aa34604e2efe6e 100644 --- a/test/parallel/test-http-legacy.js +++ b/test/parallel/test-http-legacy.js @@ -4,10 +4,6 @@ var assert = require('assert'); var http = require('http'); var url = require('url'); -function p(x) { - common.error(common.inspect(x)); -} - var responses_sent = 0; var responses_recvd = 0; var body0 = ''; diff --git a/test/parallel/test-http-localaddress-bind-error.js b/test/parallel/test-http-localaddress-bind-error.js index 80c7cab7c8e1ad..cbe23bb729b1d5 100644 --- a/test/parallel/test-http-localaddress-bind-error.js +++ b/test/parallel/test-http-localaddress-bind-error.js @@ -17,7 +17,7 @@ var server = http.createServer(function(req, res) { }); server.listen(common.PORT, '127.0.0.1', function() { - var req = http.request({ + http.request({ host: 'localhost', port: common.PORT, path: '/', diff --git a/test/parallel/test-http-many-ended-pipelines.js b/test/parallel/test-http-many-ended-pipelines.js index 4e0bc7e8ff736f..b353d12793b633 100644 --- a/test/parallel/test-http-many-ended-pipelines.js +++ b/test/parallel/test-http-many-ended-pipelines.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); // no warnings should happen! var trace = console.trace; diff --git a/test/parallel/test-http-methods.js b/test/parallel/test-http-methods.js index 348fd2e519ef64..0632a5e307bb52 100644 --- a/test/parallel/test-http-methods.js +++ b/test/parallel/test-http-methods.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var http = require('http'); var util = require('util'); diff --git a/test/parallel/test-http-no-content-length.js b/test/parallel/test-http-no-content-length.js index 5752e5e924cd1b..7a205dc07df3ca 100644 --- a/test/parallel/test-http-no-content-length.js +++ b/test/parallel/test-http-no-content-length.js @@ -10,7 +10,7 @@ var server = net.createServer(function(socket) { // Neither Content-Length nor Connection socket.end('HTTP/1.1 200 ok\r\n\r\nHello'); }).listen(common.PORT, function() { - var req = http.get({port: common.PORT}, function(res) { + http.get({port: common.PORT}, function(res) { res.setEncoding('utf8'); res.on('data', function(chunk) { body += chunk; diff --git a/test/parallel/test-http-parser-bad-ref.js b/test/parallel/test-http-parser-bad-ref.js index d409dc62d008d9..71709f8da6fd5c 100644 --- a/test/parallel/test-http-parser-bad-ref.js +++ b/test/parallel/test-http-parser-bad-ref.js @@ -4,7 +4,6 @@ // Flags: --expose_gc -var common = require('../common'); var assert = require('assert'); var HTTPParser = process.binding('http_parser').HTTPParser; diff --git a/test/parallel/test-http-parser.js b/test/parallel/test-http-parser.js index bb004f864cf468..09a23eefde52a3 100644 --- a/test/parallel/test-http-parser.js +++ b/test/parallel/test-http-parser.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var HTTPParser = process.binding('http_parser').HTTPParser; diff --git a/test/parallel/test-http-proxy.js b/test/parallel/test-http-proxy.js index fc8a753f2485ce..8a579cd69aa5b4 100644 --- a/test/parallel/test-http-proxy.js +++ b/test/parallel/test-http-proxy.js @@ -25,7 +25,7 @@ var backend = http.createServer(function(req, res) { var proxy = http.createServer(function(req, res) { console.error('proxy req headers: ' + JSON.stringify(req.headers)); - var proxy_req = http.get({ + http.get({ port: BACKEND_PORT, path: url.parse(req.url).pathname }, function(proxy_res) { @@ -56,7 +56,7 @@ function startReq() { nlistening++; if (nlistening < 2) return; - var client = http.get({ + http.get({ port: PROXY_PORT, path: '/test' }, function(res) { diff --git a/test/parallel/test-http-raw-headers.js b/test/parallel/test-http-raw-headers.js index 7ecaaa93cfb04e..2042c0262a95ed 100644 --- a/test/parallel/test-http-raw-headers.js +++ b/test/parallel/test-http-raw-headers.js @@ -54,14 +54,6 @@ http.createServer(function(req, res) { ]); res.end('x f o o'); }).listen(common.PORT, function() { - var expectRawHeaders = [ - 'Date', - 'Tue, 06 Aug 2013 01:31:54 GMT', - 'Connection', - 'close', - 'Transfer-Encoding', - 'chunked' - ]; var req = http.request({ port: common.PORT, path: '/' }); req.addTrailers([ ['x-bAr', 'yOyOyOy'], diff --git a/test/parallel/test-http-res-write-after-end.js b/test/parallel/test-http-res-write-after-end.js index c8b3bf26e0804b..206f4273ec70c7 100644 --- a/test/parallel/test-http-res-write-after-end.js +++ b/test/parallel/test-http-res-write-after-end.js @@ -18,7 +18,7 @@ var server = http.Server(function(req, res) { }); server.listen(common.PORT, function() { - var req = http.get({port: common.PORT}, function(res) { + http.get({port: common.PORT}, function(res) { server.close(); }); }); diff --git a/test/parallel/test-http-server-stale-close.js b/test/parallel/test-http-server-stale-close.js index a866d39c2cc735..349e869c1a4fbc 100644 --- a/test/parallel/test-http-server-stale-close.js +++ b/test/parallel/test-http-server-stale-close.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var util = require('util'); var fork = require('child_process').fork; diff --git a/test/parallel/test-http-timeout.js b/test/parallel/test-http-timeout.js index aab903420f0acc..08b8adfbece0bd 100644 --- a/test/parallel/test-http-timeout.js +++ b/test/parallel/test-http-timeout.js @@ -1,7 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); - var http = require('http'); var port = common.PORT; diff --git a/test/parallel/test-http-unix-socket.js b/test/parallel/test-http-unix-socket.js index 9ec8c8a1572844..708bb540f7dee0 100644 --- a/test/parallel/test-http-unix-socket.js +++ b/test/parallel/test-http-unix-socket.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var fs = require('fs'); var http = require('http'); var status_ok = false; // status code == 200? diff --git a/test/parallel/test-http-url.parse-https.request.js b/test/parallel/test-http-url.parse-https.request.js index 10c40ec0310708..df01ae64f81dba 100644 --- a/test/parallel/test-http-url.parse-https.request.js +++ b/test/parallel/test-http-url.parse-https.request.js @@ -10,7 +10,6 @@ var https = require('https'); var url = require('url'); var fs = require('fs'); -var clientRequest; // https options var httpsOptions = { diff --git a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js index fd52a0b62d11de..1f7bb8608c94c5 100644 --- a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js +++ b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var http = require('http'); var url = require('url'); diff --git a/test/parallel/test-http.js b/test/parallel/test-http.js index daa746cdbe5b7a..6ce4df4480659e 100644 --- a/test/parallel/test-http.js +++ b/test/parallel/test-http.js @@ -4,10 +4,6 @@ var assert = require('assert'); var http = require('http'); var url = require('url'); -function p(x) { - common.error(common.inspect(x)); -} - var responses_sent = 0; var responses_recvd = 0; var body0 = ''; diff --git a/test/parallel/test-https-agent-servername.js b/test/parallel/test-https-agent-servername.js index 2be40836a04ea2..f7d5e5a40d8679 100644 --- a/test/parallel/test-https-agent-servername.js +++ b/test/parallel/test-https-agent-servername.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); diff --git a/test/parallel/test-https-byteswritten.js b/test/parallel/test-https-byteswritten.js index 5163eccc262ffa..beef89b25ccb98 100644 --- a/test/parallel/test-https-byteswritten.js +++ b/test/parallel/test-https-byteswritten.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var fs = require('fs'); -var http = require('http'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); diff --git a/test/parallel/test-https-eof-for-eom.js b/test/parallel/test-https-eof-for-eom.js index 0445625bace642..50d909373ff5b0 100644 --- a/test/parallel/test-https-eof-for-eom.js +++ b/test/parallel/test-https-eof-for-eom.js @@ -53,7 +53,7 @@ var bodyBuffer = ''; server.listen(common.PORT, function() { console.log('1) Making Request'); - var req = https.get({ + https.get({ port: common.PORT, rejectUnauthorized: false }, function(res) { diff --git a/test/parallel/test-https-localaddress-bind-error.js b/test/parallel/test-https-localaddress-bind-error.js index b3cb4ffe6b077b..460fed5d535634 100644 --- a/test/parallel/test-https-localaddress-bind-error.js +++ b/test/parallel/test-https-localaddress-bind-error.js @@ -28,7 +28,7 @@ var server = https.createServer(options, function(req, res) { }); server.listen(common.PORT, '127.0.0.1', function() { - var req = https.request({ + https.request({ host: 'localhost', port: common.PORT, path: '/', diff --git a/test/parallel/test-https-socket-options.js b/test/parallel/test-https-socket-options.js index 44e179f27a800c..ec45d2c2bafba4 100644 --- a/test/parallel/test-https-socket-options.js +++ b/test/parallel/test-https-socket-options.js @@ -1,16 +1,12 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); return; } var https = require('https'); - var fs = require('fs'); -var exec = require('child_process').exec; - var http = require('http'); var options = { diff --git a/test/parallel/test-https-strict.js b/test/parallel/test-https-strict.js index 65ebfabde2bcdd..dcc7ab86ae3810 100644 --- a/test/parallel/test-https-strict.js +++ b/test/parallel/test-https-strict.js @@ -110,7 +110,6 @@ function makeReq(path, port, error, host, ca) { path: path, ca: ca }; - var whichCa = 0; if (!ca) { options.agent = agent0; } else { diff --git a/test/parallel/test-https-timeout-server-2.js b/test/parallel/test-https-timeout-server-2.js index 9970688fe7c1e8..dbdf80d9ebc9fb 100644 --- a/test/parallel/test-https-timeout-server-2.js +++ b/test/parallel/test-https-timeout-server-2.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { } var https = require('https'); -var net = require('net'); var tls = require('tls'); var fs = require('fs'); diff --git a/test/parallel/test-https-timeout-server.js b/test/parallel/test-https-timeout-server.js index 0db7ad533d9868..68e99598966fb7 100644 --- a/test/parallel/test-https-timeout-server.js +++ b/test/parallel/test-https-timeout-server.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { var https = require('https'); var net = require('net'); -var tls = require('tls'); var fs = require('fs'); var clientErrors = 0; diff --git a/test/parallel/test-https-timeout.js b/test/parallel/test-https-timeout.js index 7f34c18bec0897..2b41dadaec7857 100644 --- a/test/parallel/test-https-timeout.js +++ b/test/parallel/test-https-timeout.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); @@ -9,7 +8,6 @@ if (!common.hasCrypto) { var https = require('https'); var fs = require('fs'); -var exec = require('child_process').exec; var options = { key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), diff --git a/test/parallel/test-https-truncate.js b/test/parallel/test-https-truncate.js index e77bf29ed25454..83506c65d6f3cc 100644 --- a/test/parallel/test-https-truncate.js +++ b/test/parallel/test-https-truncate.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { var https = require('https'); var fs = require('fs'); -var path = require('path'); var key = fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'); var cert = fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem'); diff --git a/test/parallel/test-internal-modules-expose.js b/test/parallel/test-internal-modules-expose.js index 4ece1d0c7b6f29..c487eb0b9b56c8 100644 --- a/test/parallel/test-internal-modules-expose.js +++ b/test/parallel/test-internal-modules-expose.js @@ -1,7 +1,6 @@ 'use strict'; // Flags: --expose_internals -var common = require('../common'); var assert = require('assert'); assert.equal(typeof require('internal/freelist').FreeList, 'function'); diff --git a/test/parallel/test-internal-modules.js b/test/parallel/test-internal-modules.js index 011b6f7132e9bf..8a038e5ac7be65 100644 --- a/test/parallel/test-internal-modules.js +++ b/test/parallel/test-internal-modules.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); assert.throws(function() { diff --git a/test/parallel/test-intl.js b/test/parallel/test-intl.js index 7288febf9e6bfd..21c638c097bfae 100644 --- a/test/parallel/test-intl.js +++ b/test/parallel/test-intl.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // does node think that i18n was enabled? diff --git a/test/parallel/test-listen-fd-cluster.js b/test/parallel/test-listen-fd-cluster.js index f6d00c72a0f78c..c321f699d7a89d 100644 --- a/test/parallel/test-listen-fd-cluster.js +++ b/test/parallel/test-listen-fd-cluster.js @@ -4,7 +4,6 @@ var assert = require('assert'); var http = require('http'); var net = require('net'); var PORT = common.PORT; -var spawn = require('child_process').spawn; var cluster = require('cluster'); console.error('Cluster listen fd test', process.argv[2] || 'runner'); diff --git a/test/parallel/test-listen-fd-ebadf.js b/test/parallel/test-listen-fd-ebadf.js index db905dfa35e966..7338a34e9e1a10 100644 --- a/test/parallel/test-listen-fd-ebadf.js +++ b/test/parallel/test-listen-fd-ebadf.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/parallel/test-listen-fd-server.js b/test/parallel/test-listen-fd-server.js index d51d51ee8eb4de..3e0fa521f75334 100644 --- a/test/parallel/test-listen-fd-server.js +++ b/test/parallel/test-listen-fd-server.js @@ -4,7 +4,6 @@ var assert = require('assert'); var http = require('http'); var net = require('net'); var PORT = common.PORT; -var spawn = require('child_process').spawn; if (common.isWindows) { console.log('1..0 # Skipped: This test is disabled on windows.'); diff --git a/test/parallel/test-microtask-queue-integration-domain.js b/test/parallel/test-microtask-queue-integration-domain.js index 7a4ad77cd321e3..b6ec65fb020f4f 100644 --- a/test/parallel/test-microtask-queue-integration-domain.js +++ b/test/parallel/test-microtask-queue-integration-domain.js @@ -1,7 +1,5 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); -var domain = require('domain'); var implementations = [ function(fn) { diff --git a/test/parallel/test-microtask-queue-integration.js b/test/parallel/test-microtask-queue-integration.js index 37de5ee33b1477..b6ec65fb020f4f 100644 --- a/test/parallel/test-microtask-queue-integration.js +++ b/test/parallel/test-microtask-queue-integration.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var implementations = [ diff --git a/test/parallel/test-microtask-queue-run-domain.js b/test/parallel/test-microtask-queue-run-domain.js index 77534920ff1451..8f928ceec366c1 100644 --- a/test/parallel/test-microtask-queue-run-domain.js +++ b/test/parallel/test-microtask-queue-run-domain.js @@ -1,7 +1,5 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); -var domain = require('domain'); function enqueueMicrotask(fn) { Promise.resolve().then(fn); diff --git a/test/parallel/test-microtask-queue-run-immediate-domain.js b/test/parallel/test-microtask-queue-run-immediate-domain.js index 2dea0a76cc1bf4..b7d28a26c8c764 100644 --- a/test/parallel/test-microtask-queue-run-immediate-domain.js +++ b/test/parallel/test-microtask-queue-run-immediate-domain.js @@ -1,7 +1,5 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); -var domain = require('domain'); function enqueueMicrotask(fn) { Promise.resolve().then(fn); diff --git a/test/parallel/test-microtask-queue-run-immediate.js b/test/parallel/test-microtask-queue-run-immediate.js index cfd9cd3659ef00..b7d28a26c8c764 100644 --- a/test/parallel/test-microtask-queue-run-immediate.js +++ b/test/parallel/test-microtask-queue-run-immediate.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); function enqueueMicrotask(fn) { diff --git a/test/parallel/test-microtask-queue-run.js b/test/parallel/test-microtask-queue-run.js index ca758546c2bcfd..8f928ceec366c1 100644 --- a/test/parallel/test-microtask-queue-run.js +++ b/test/parallel/test-microtask-queue-run.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); function enqueueMicrotask(fn) { diff --git a/test/parallel/test-net-create-connection.js b/test/parallel/test-net-create-connection.js index c245ddc2ae7860..38452be6e6a954 100644 --- a/test/parallel/test-net-create-connection.js +++ b/test/parallel/test-net-create-connection.js @@ -22,7 +22,7 @@ server.listen(tcpPort, 'localhost', function() { function fail(opts, errtype, msg) { assert.throws(function() { - var client = net.createConnection(opts, cb); + net.createConnection(opts, cb); }, function(err) { return err instanceof errtype && msg === err.message; }); diff --git a/test/parallel/test-net-dns-custom-lookup.js b/test/parallel/test-net-dns-custom-lookup.js index 008e831c61fc9c..a2ce3966ae1237 100644 --- a/test/parallel/test-net-dns-custom-lookup.js +++ b/test/parallel/test-net-dns-custom-lookup.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var net = require('net'); -var dns = require('dns'); var ok = false; function check(addressType, cb) { diff --git a/test/parallel/test-net-dns-error.js b/test/parallel/test-net-dns-error.js index 17f251cec3b6af..77963f4fb20224 100644 --- a/test/parallel/test-net-dns-error.js +++ b/test/parallel/test-net-dns-error.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/parallel/test-net-end-without-connect.js b/test/parallel/test-net-end-without-connect.js index 2911591f9f486d..a3669338743be5 100644 --- a/test/parallel/test-net-end-without-connect.js +++ b/test/parallel/test-net-end-without-connect.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var net = require('net'); var sock = new net.Socket(); diff --git a/test/parallel/test-net-isip.js b/test/parallel/test-net-isip.js index 96177122b7ba21..935a85670f5311 100644 --- a/test/parallel/test-net-isip.js +++ b/test/parallel/test-net-isip.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/parallel/test-net-listen-close-server.js b/test/parallel/test-net-listen-close-server.js index 9c4dbcfe2e15e2..eaab6c5c8bf172 100644 --- a/test/parallel/test-net-listen-close-server.js +++ b/test/parallel/test-net-listen-close-server.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var net = require('net'); -var gotError = false; var server = net.createServer(function(socket) { }); diff --git a/test/parallel/test-net-listen-fd0.js b/test/parallel/test-net-listen-fd0.js index e326ac2b60beb1..0eb30405aef29c 100644 --- a/test/parallel/test-net-listen-fd0.js +++ b/test/parallel/test-net-listen-fd0.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/parallel/test-net-local-address-port.js b/test/parallel/test-net-local-address-port.js index aa28d180dae6ff..728993ee1bb023 100644 --- a/test/parallel/test-net-local-address-port.js +++ b/test/parallel/test-net-local-address-port.js @@ -3,7 +3,7 @@ var common = require('../common'); var assert = require('assert'); var net = require('net'); -var conns = 0, conns_closed = 0; +var conns = 0; var server = net.createServer(function(socket) { conns++; diff --git a/test/parallel/test-net-localerror.js b/test/parallel/test-net-localerror.js index 45ec1fc9099955..ed7c9471e0397f 100644 --- a/test/parallel/test-net-localerror.js +++ b/test/parallel/test-net-localerror.js @@ -17,6 +17,6 @@ connect({ function connect(opts, msg) { assert.throws(function() { - var client = net.connect(opts); + net.connect(opts); }, msg); } diff --git a/test/parallel/test-net-reconnect.js b/test/parallel/test-net-reconnect.js index b2e8f6ea8b4e3f..f8cdcbdc4e76dd 100644 --- a/test/parallel/test-net-reconnect.js +++ b/test/parallel/test-net-reconnect.js @@ -5,7 +5,6 @@ var assert = require('assert'); var net = require('net'); var N = 50; -var c = 0; var client_recv_count = 0; var client_end_count = 0; var disconnect_count = 0; diff --git a/test/parallel/test-net-server-connections.js b/test/parallel/test-net-server-connections.js index 138a78defb260d..b5fb2f605eef8d 100644 --- a/test/parallel/test-net-server-connections.js +++ b/test/parallel/test-net-server-connections.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/parallel/test-net-server-unref-persistent.js b/test/parallel/test-net-server-unref-persistent.js index a071b625ef26d7..0b0a38bba35df4 100644 --- a/test/parallel/test-net-server-unref-persistent.js +++ b/test/parallel/test-net-server-unref-persistent.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var net = require('net'); var closed = false; diff --git a/test/parallel/test-next-tick-domain.js b/test/parallel/test-next-tick-domain.js index 4d53bba6c4f5cc..bc55c6bfc238c7 100644 --- a/test/parallel/test-next-tick-domain.js +++ b/test/parallel/test-next-tick-domain.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var origNextTick = process.nextTick; diff --git a/test/parallel/test-next-tick-errors.js b/test/parallel/test-next-tick-errors.js index eccd7a43a0825f..605c59950e5b9e 100644 --- a/test/parallel/test-next-tick-errors.js +++ b/test/parallel/test-next-tick-errors.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var order = [], diff --git a/test/parallel/test-next-tick-intentional-starvation.js b/test/parallel/test-next-tick-intentional-starvation.js index d4a8a1b7481329..fb6a4db44dba86 100644 --- a/test/parallel/test-next-tick-intentional-starvation.js +++ b/test/parallel/test-next-tick-intentional-starvation.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // this is the inverse of test-next-tick-starvation. diff --git a/test/parallel/test-next-tick-ordering.js b/test/parallel/test-next-tick-ordering.js index c2b936a1061d52..781e765e01b86c 100644 --- a/test/parallel/test-next-tick-ordering.js +++ b/test/parallel/test-next-tick-ordering.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var i; diff --git a/test/parallel/test-next-tick-ordering2.js b/test/parallel/test-next-tick-ordering2.js index 4252d623679f65..27998ea8062143 100644 --- a/test/parallel/test-next-tick-ordering2.js +++ b/test/parallel/test-next-tick-ordering2.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var order = []; diff --git a/test/parallel/test-next-tick.js b/test/parallel/test-next-tick.js index 54e7b88cf022ca..d812ab1235172c 100644 --- a/test/parallel/test-next-tick.js +++ b/test/parallel/test-next-tick.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var complete = 0; diff --git a/test/parallel/test-path-zero-length-strings.js b/test/parallel/test-path-zero-length-strings.js index 083eb3e7ac03c6..70f147bfd2867d 100644 --- a/test/parallel/test-path-zero-length-strings.js +++ b/test/parallel/test-path-zero-length-strings.js @@ -5,7 +5,6 @@ // directory. This test makes sure that the behaviour is intact between commits. // See: https://github.com/nodejs/node/pull/2106 -const common = require('../common'); const assert = require('assert'); const path = require('path'); const pwd = process.cwd(); diff --git a/test/parallel/test-pipe-return-val.js b/test/parallel/test-pipe-return-val.js index 718d052cd24c27..6f62bc1c12d7df 100644 --- a/test/parallel/test-pipe-return-val.js +++ b/test/parallel/test-pipe-return-val.js @@ -1,10 +1,8 @@ 'use strict'; // This test ensures SourceStream.pipe(DestStream) returns DestStream -var common = require('../common'); var Stream = require('stream').Stream; var assert = require('assert'); -var util = require('util'); var sourceStream = new Stream(); var destStream = new Stream(); diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js index b4a3af78d8df3b..d2bd79e5aec478 100644 --- a/test/parallel/test-preload.js +++ b/test/parallel/test-preload.js @@ -1,8 +1,7 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - path = require('path'), - child_process = require('child_process'); +var assert = require('assert'); +var path = require('path'); +var child_process = require('child_process'); var nodeBinary = process.argv[0]; @@ -82,7 +81,6 @@ child_process.exec(nodeBinary + ' ' }); // https://github.com/nodejs/node/issues/1691 -var originalCwd = process.cwd(); process.chdir(path.join(__dirname, '../fixtures/')); child_process.exec(nodeBinary + ' ' + '--expose_debug_as=v8debug ' diff --git a/test/parallel/test-process-before-exit.js b/test/parallel/test-process-before-exit.js index eff96da98e4729..879efbc0b79274 100644 --- a/test/parallel/test-process-before-exit.js +++ b/test/parallel/test-process-before-exit.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var common = require('../common'); var N = 5; var n = 0; diff --git a/test/parallel/test-process-config.js b/test/parallel/test-process-config.js index 4fc3bcaa98afc8..34933596a55ea3 100644 --- a/test/parallel/test-process-config.js +++ b/test/parallel/test-process-config.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); var path = require('path'); diff --git a/test/parallel/test-process-env.js b/test/parallel/test-process-env.js index 7e927d09bae668..38456fc587171f 100644 --- a/test/parallel/test-process-env.js +++ b/test/parallel/test-process-env.js @@ -4,7 +4,6 @@ // first things first, set the timezone; see tzset(3) process.env.TZ = 'Europe/Amsterdam'; -var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-process-exit-code.js b/test/parallel/test-process-exit-code.js index fea8c2d4fcdc5d..4e61e31c53168d 100644 --- a/test/parallel/test-process-exit-code.js +++ b/test/parallel/test-process-exit-code.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); switch (process.argv[2]) { diff --git a/test/parallel/test-process-exit.js b/test/parallel/test-process-exit.js index 999eefc1eff518..1eb3af12ed8f3a 100644 --- a/test/parallel/test-process-exit.js +++ b/test/parallel/test-process-exit.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // calling .exit() from within "exit" should not overflow the call stack diff --git a/test/parallel/test-process-getgroups.js b/test/parallel/test-process-getgroups.js index b18b5a0f2f90d4..4b9358f93e298c 100644 --- a/test/parallel/test-process-getgroups.js +++ b/test/parallel/test-process-getgroups.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var exec = require('child_process').exec; diff --git a/test/parallel/test-process-hrtime.js b/test/parallel/test-process-hrtime.js index 0e2c5b110e9292..cbe0dfda600892 100644 --- a/test/parallel/test-process-hrtime.js +++ b/test/parallel/test-process-hrtime.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // the default behavior, return an Array "tuple" of numbers diff --git a/test/parallel/test-process-kill-null.js b/test/parallel/test-process-kill-null.js index 65dab752f12e6d..53d31ae5f536df 100644 --- a/test/parallel/test-process-kill-null.js +++ b/test/parallel/test-process-kill-null.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-process-kill-pid.js b/test/parallel/test-process-kill-pid.js index f193e979166da7..c9cd9c46b313ba 100644 --- a/test/parallel/test-process-kill-pid.js +++ b/test/parallel/test-process-kill-pid.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // test variants of pid diff --git a/test/parallel/test-process-next-tick.js b/test/parallel/test-process-next-tick.js index e7b5f8f3fe886e..7536188e364ec5 100644 --- a/test/parallel/test-process-next-tick.js +++ b/test/parallel/test-process-next-tick.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var N = 2; var tickCount = 0; diff --git a/test/parallel/test-process-raw-debug.js b/test/parallel/test-process-raw-debug.js index f849457d643894..a1734e08e4813c 100644 --- a/test/parallel/test-process-raw-debug.js +++ b/test/parallel/test-process-raw-debug.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var os = require('os'); diff --git a/test/parallel/test-process-wrap.js b/test/parallel/test-process-wrap.js index bf3dfe4e8b1651..6043a5f834904f 100644 --- a/test/parallel/test-process-wrap.js +++ b/test/parallel/test-process-wrap.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Process = process.binding('process_wrap').Process; var Pipe = process.binding('pipe_wrap').Pipe; diff --git a/test/parallel/test-promises-unhandled-rejections.js b/test/parallel/test-promises-unhandled-rejections.js index e5b3e6f35c0d45..212c1564e18a5f 100644 --- a/test/parallel/test-promises-unhandled-rejections.js +++ b/test/parallel/test-promises-unhandled-rejections.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var domain = require('domain'); @@ -185,12 +184,11 @@ asyncTest('When re-throwing new errors in a promise catch, only the' + asyncTest('Test params of unhandledRejection for a synchronously-rejected' + 'promise', function(done) { var e = new Error(); - var e2 = new Error(); onUnhandledSucceed(done, function(reason, promise) { assert.strictEqual(e, reason); assert.strictEqual(promise, promise); }); - var promise = Promise.reject(e); + Promise.reject(e); }); asyncTest('When re-throwing new errors in a promise catch, only the ' + @@ -629,7 +627,7 @@ asyncTest('Promise unhandledRejection handler does not interfere with domain' + assert.strictEqual(domainReceivedError, domainError); d.dispose(); }); - var a = Promise.reject(e); + Promise.reject(e); process.nextTick(function() { throw domainError; }); diff --git a/test/parallel/test-punycode.js b/test/parallel/test-punycode.js index 179bca51ec2fe0..906e6838f91459 100644 --- a/test/parallel/test-punycode.js +++ b/test/parallel/test-punycode.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var punycode = require('punycode'); var assert = require('assert'); diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js index 66497ac2d3b6db..834f2d5c8d691b 100644 --- a/test/parallel/test-querystring.js +++ b/test/parallel/test-querystring.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // test using assert diff --git a/test/parallel/test-readdouble.js b/test/parallel/test-readdouble.js index c0dab8956593fe..6ed09d060596ee 100644 --- a/test/parallel/test-readdouble.js +++ b/test/parallel/test-readdouble.js @@ -2,7 +2,6 @@ /* * Tests to verify we're reading in doubles correctly */ -var common = require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-readfloat.js b/test/parallel/test-readfloat.js index 5572bbf18e291b..9f58995bbf68bb 100644 --- a/test/parallel/test-readfloat.js +++ b/test/parallel/test-readfloat.js @@ -2,7 +2,6 @@ /* * Tests to verify we're reading in floats correctly */ -var common = require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-readint.js b/test/parallel/test-readint.js index 233128d792d068..bc14c0ee1c3fed 100644 --- a/test/parallel/test-readint.js +++ b/test/parallel/test-readint.js @@ -2,7 +2,6 @@ /* * Tests to verify we're reading in signed integers correctly */ -var common = require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-readline-keys.js b/test/parallel/test-readline-keys.js index 150273f7993963..bd76f6e5b9af15 100644 --- a/test/parallel/test-readline-keys.js +++ b/test/parallel/test-readline-keys.js @@ -1,5 +1,4 @@ 'use strict'; -var EventEmitter = require('events').EventEmitter; var PassThrough = require('stream').PassThrough; var assert = require('assert'); var inherits = require('util').inherits; @@ -15,7 +14,7 @@ inherits(FakeInput, PassThrough); var fi = new FakeInput(); var fo = new FakeInput(); -var rli = new Interface({ input: fi, output: fo, terminal: true }); +new Interface({ input: fi, output: fo, terminal: true }); var keys = []; fi.on('keypress', function(s, k) { diff --git a/test/parallel/test-readuint.js b/test/parallel/test-readuint.js index b984541bfe9eb0..f83e69c86f6c07 100644 --- a/test/parallel/test-readuint.js +++ b/test/parallel/test-readuint.js @@ -3,7 +3,6 @@ * A battery of tests to help us read a series of uints */ -var common = require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-ref-unref-return.js b/test/parallel/test-ref-unref-return.js index a82a433ab1af05..741d33058e2a8d 100644 --- a/test/parallel/test-ref-unref-return.js +++ b/test/parallel/test-ref-unref-return.js @@ -2,7 +2,6 @@ var assert = require('assert'); var net = require('net'); var dgram = require('dgram'); -var common = require('../common'); assert.ok((new net.Server()).ref() instanceof net.Server); assert.ok((new net.Server()).unref() instanceof net.Server); diff --git a/test/parallel/test-regress-GH-4256.js b/test/parallel/test-regress-GH-4256.js index f512e613162522..85e6456307d854 100644 --- a/test/parallel/test-regress-GH-4256.js +++ b/test/parallel/test-regress-GH-4256.js @@ -1,5 +1,5 @@ 'use strict'; process.domain = null; -var timer = setTimeout(function() { +setTimeout(function() { console.log('this console.log statement should not make node crash'); }, 1); diff --git a/test/parallel/test-regress-GH-6235.js b/test/parallel/test-regress-GH-6235.js index 2f2f17d9698fc9..70392de5ca8c1c 100644 --- a/test/parallel/test-regress-GH-6235.js +++ b/test/parallel/test-regress-GH-6235.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); assert.doesNotThrow(function() { diff --git a/test/parallel/test-regress-GH-7511.js b/test/parallel/test-regress-GH-7511.js index 0e5c4ded011a43..1752d381e2eee1 100644 --- a/test/parallel/test-regress-GH-7511.js +++ b/test/parallel/test-regress-GH-7511.js @@ -1,7 +1,6 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - vm = require('vm'); +var assert = require('assert'); +var vm = require('vm'); assert.doesNotThrow(function() { var context = vm.createContext({ process: process }); diff --git a/test/parallel/test-regress-GH-897.js b/test/parallel/test-regress-GH-897.js index 4b7ba61f9ceca9..80e9c8f70ee6d1 100644 --- a/test/parallel/test-regress-GH-897.js +++ b/test/parallel/test-regress-GH-897.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var t = Date.now(); diff --git a/test/parallel/test-repl-autolibs.js b/test/parallel/test-repl-autolibs.js index 4103a19243aec5..74b2652f7c43fb 100644 --- a/test/parallel/test-repl-autolibs.js +++ b/test/parallel/test-repl-autolibs.js @@ -19,7 +19,7 @@ ArrayStream.prototype.resume = function() {}; ArrayStream.prototype.write = function() {}; var putIn = new ArrayStream(); -var testMe = repl.start('', putIn, null, true); +repl.start('', putIn, null, true); test1(); diff --git a/test/parallel/test-repl-console.js b/test/parallel/test-repl-console.js index e66fcb1621adc5..a36e9bcadda3cd 100644 --- a/test/parallel/test-repl-console.js +++ b/test/parallel/test-repl-console.js @@ -1,8 +1,7 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - Stream = require('stream'), - repl = require('repl'); +var assert = require('assert'); +var Stream = require('stream'); +var repl = require('repl'); // create a dummy stream that does nothing var stream = new Stream(); diff --git a/test/parallel/test-repl-domain.js b/test/parallel/test-repl-domain.js index 7528f502878f63..d0221394feae3c 100644 --- a/test/parallel/test-repl-domain.js +++ b/test/parallel/test-repl-domain.js @@ -1,6 +1,4 @@ 'use strict'; -var assert = require('assert'); -var common = require('../common'); var util = require('util'); var repl = require('repl'); @@ -21,7 +19,7 @@ ArrayStream.prototype.resume = function() {}; ArrayStream.prototype.write = function() {}; var putIn = new ArrayStream(); -var testMe = repl.start('', putIn); +repl.start('', putIn); putIn.write = function(data) { // Don't use assert for this because the domain might catch it, and diff --git a/test/parallel/test-repl-end-emits-exit.js b/test/parallel/test-repl-end-emits-exit.js index e4bc4da78c142d..433209408a36ad 100644 --- a/test/parallel/test-repl-end-emits-exit.js +++ b/test/parallel/test-repl-end-emits-exit.js @@ -1,10 +1,9 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - Stream = require('stream'), - repl = require('repl'), - terminalExit = 0, - regularExit = 0; +var assert = require('assert'); +var Stream = require('stream'); +var repl = require('repl'); +var terminalExit = 0; +var regularExit = 0; // create a dummy stream that does nothing var stream = new Stream(); diff --git a/test/parallel/test-repl-harmony.js b/test/parallel/test-repl-harmony.js index 6bc5cb57aa1187..119d4b3f087c29 100644 --- a/test/parallel/test-repl-harmony.js +++ b/test/parallel/test-repl-harmony.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-repl-require-cache.js b/test/parallel/test-repl-require-cache.js index d9b4d71d484640..fa1f8f7c34586d 100644 --- a/test/parallel/test-repl-require-cache.js +++ b/test/parallel/test-repl-require-cache.js @@ -1,7 +1,6 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - repl = require('repl'); +var assert = require('assert'); +var repl = require('repl'); // https://github.com/joyent/node/issues/3226 diff --git a/test/parallel/test-repl-setprompt.js b/test/parallel/test-repl-setprompt.js index b89dd6c928ab0a..0becac11dc6683 100644 --- a/test/parallel/test-repl-setprompt.js +++ b/test/parallel/test-repl-setprompt.js @@ -1,9 +1,8 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - spawn = require('child_process').spawn, - os = require('os'), - util = require('util'); +var assert = require('assert'); +var spawn = require('child_process').spawn; +var os = require('os'); +var util = require('util'); var args = [ '-e', diff --git a/test/parallel/test-repl-syntax-error-handling.js b/test/parallel/test-repl-syntax-error-handling.js index 66e8fb6b352c56..70ad5853826966 100644 --- a/test/parallel/test-repl-syntax-error-handling.js +++ b/test/parallel/test-repl-syntax-error-handling.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); switch (process.argv[2]) { diff --git a/test/parallel/test-repl-tab.js b/test/parallel/test-repl-tab.js index badab2133b7e7e..e85b141533236f 100644 --- a/test/parallel/test-repl-tab.js +++ b/test/parallel/test-repl-tab.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var util = require('util'); var repl = require('repl'); var zlib = require('zlib'); diff --git a/test/parallel/test-repl-unexpected-token-recoverable.js b/test/parallel/test-repl-unexpected-token-recoverable.js index 4cfaa5136b6a55..68e33c1de9ef39 100644 --- a/test/parallel/test-repl-unexpected-token-recoverable.js +++ b/test/parallel/test-repl-unexpected-token-recoverable.js @@ -2,7 +2,6 @@ /* * This is a regression test for https://github.com/joyent/node/issues/8874. */ -var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-require-cache.js b/test/parallel/test-require-cache.js index f2245345e3e4bd..47d818f0d06cf2 100644 --- a/test/parallel/test-require-cache.js +++ b/test/parallel/test-require-cache.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); (function testInjectFakeModule() { diff --git a/test/parallel/test-require-extensions-main.js b/test/parallel/test-require-extensions-main.js index 198fa6a8c52d37..0376082262dd78 100644 --- a/test/parallel/test-require-extensions-main.js +++ b/test/parallel/test-require-extensions-main.js @@ -1,5 +1,4 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); require(common.fixturesDir + '/require-bin/bin/req.js'); diff --git a/test/parallel/test-signal-safety.js b/test/parallel/test-signal-safety.js index 549c26662f717a..514290c49018dd 100644 --- a/test/parallel/test-signal-safety.js +++ b/test/parallel/test-signal-safety.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Signal = process.binding('signal_wrap').Signal; diff --git a/test/parallel/test-stdin-hang.js b/test/parallel/test-stdin-hang.js index 4818a9ee952026..4bb14cd050218b 100644 --- a/test/parallel/test-stdin-hang.js +++ b/test/parallel/test-stdin-hang.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); // This test *only* verifies that invoking the stdin getter does not // cause node to hang indefinitely. diff --git a/test/parallel/test-stdio-readable-writable.js b/test/parallel/test-stdio-readable-writable.js index f8a8923498cb03..75c4dcd18ea754 100644 --- a/test/parallel/test-stdio-readable-writable.js +++ b/test/parallel/test-stdio-readable-writable.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); assert(process.stdout.writable); diff --git a/test/parallel/test-stdout-close-unref.js b/test/parallel/test-stdout-close-unref.js index 12a031562bf6f0..2048322745376d 100644 --- a/test/parallel/test-stdout-close-unref.js +++ b/test/parallel/test-stdout-close-unref.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var common = require('../common'); var errs = 0; diff --git a/test/parallel/test-stream-big-packet.js b/test/parallel/test-stream-big-packet.js index a9f6064c7e7277..18a2e5ee4e3374 100644 --- a/test/parallel/test-stream-big-packet.js +++ b/test/parallel/test-stream-big-packet.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var util = require('util'); var stream = require('stream'); diff --git a/test/parallel/test-stream-big-push.js b/test/parallel/test-stream-big-push.js index e02ff98d3c7454..bf1138c2a00986 100644 --- a/test/parallel/test-stream-big-push.js +++ b/test/parallel/test-stream-big-push.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var stream = require('stream'); var str = 'asdfasdfasdfasdfasdf'; diff --git a/test/parallel/test-stream-duplex.js b/test/parallel/test-stream-duplex.js index 0e8789d6bf5555..15ed80f773a295 100644 --- a/test/parallel/test-stream-duplex.js +++ b/test/parallel/test-stream-duplex.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Duplex = require('stream').Transform; diff --git a/test/parallel/test-stream-end-paused.js b/test/parallel/test-stream-end-paused.js index 585d6c327fd592..2d68b5ced563d1 100644 --- a/test/parallel/test-stream-end-paused.js +++ b/test/parallel/test-stream-end-paused.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var gotEnd = false; diff --git a/test/parallel/test-stream-ispaused.js b/test/parallel/test-stream-ispaused.js index 8112dc733a7205..6446c7e4370a46 100644 --- a/test/parallel/test-stream-ispaused.js +++ b/test/parallel/test-stream-ispaused.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var common = require('../common'); var stream = require('stream'); diff --git a/test/parallel/test-stream-pipe-after-end.js b/test/parallel/test-stream-pipe-after-end.js index 4bead73f68ce5b..4a8b57d0fb7927 100644 --- a/test/parallel/test-stream-pipe-after-end.js +++ b/test/parallel/test-stream-pipe-after-end.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Readable = require('_stream_readable'); diff --git a/test/parallel/test-stream-pipe-cleanup.js b/test/parallel/test-stream-pipe-cleanup.js index 08da96f92c3a0f..0c6f41aebd07c7 100644 --- a/test/parallel/test-stream-pipe-cleanup.js +++ b/test/parallel/test-stream-pipe-cleanup.js @@ -2,7 +2,6 @@ // This test asserts that Stream.prototype.pipe does not leave listeners // hanging on the source or dest. -var common = require('../common'); var stream = require('stream'); var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-stream-pipe-error-handling.js b/test/parallel/test-stream-pipe-error-handling.js index 031a0da7e395db..73bf6051d180a8 100644 --- a/test/parallel/test-stream-pipe-error-handling.js +++ b/test/parallel/test-stream-pipe-error-handling.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Stream = require('stream').Stream; @@ -38,7 +37,6 @@ var Stream = require('stream').Stream; })(); (function testErrorWithRemovedListenerThrows() { - var EE = require('events').EventEmitter; var R = Stream.Readable; var W = Stream.Writable; @@ -73,7 +71,6 @@ var Stream = require('stream').Stream; })(); (function testErrorWithRemovedListenerThrows() { - var EE = require('events').EventEmitter; var R = Stream.Readable; var W = Stream.Writable; diff --git a/test/parallel/test-stream-pipe-event.js b/test/parallel/test-stream-pipe-event.js index 0d10533b0c496a..e3fcd22883f69c 100644 --- a/test/parallel/test-stream-pipe-event.js +++ b/test/parallel/test-stream-pipe-event.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var stream = require('stream'); var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-stream-push-order.js b/test/parallel/test-stream-push-order.js index d67233aff7a498..a7dbcc51e8eeca 100644 --- a/test/parallel/test-stream-push-order.js +++ b/test/parallel/test-stream-push-order.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var Readable = require('stream').Readable; var assert = require('assert'); @@ -21,7 +20,7 @@ s._read = function(n) { } }; -var v = s.read(0); +s.read(0); // ACTUALLY [1, 3, 5, 6, 4, 2] diff --git a/test/parallel/test-stream-push-strings.js b/test/parallel/test-stream-push-strings.js index 0d9c0653c0dc66..66974ad7932f9d 100644 --- a/test/parallel/test-stream-push-strings.js +++ b/test/parallel/test-stream-push-strings.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; diff --git a/test/parallel/test-stream-readable-constructor-set-methods.js b/test/parallel/test-stream-readable-constructor-set-methods.js index 928ce31a8ebe7b..5ee34dc4f06c76 100644 --- a/test/parallel/test-stream-readable-constructor-set-methods.js +++ b/test/parallel/test-stream-readable-constructor-set-methods.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; diff --git a/test/parallel/test-stream-readable-event.js b/test/parallel/test-stream-readable-event.js index 965fc82c05a1d9..41faf5871e3afd 100644 --- a/test/parallel/test-stream-readable-event.js +++ b/test/parallel/test-stream-readable-event.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; diff --git a/test/parallel/test-stream-readable-flow-recursion.js b/test/parallel/test-stream-readable-flow-recursion.js index 07edd579f1deea..c9e22bfbbc7444 100644 --- a/test/parallel/test-stream-readable-flow-recursion.js +++ b/test/parallel/test-stream-readable-flow-recursion.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // this test verifies that passing a huge number to read(size) diff --git a/test/parallel/test-stream-transform-constructor-set-methods.js b/test/parallel/test-stream-transform-constructor-set-methods.js index c24c273b6f20e1..04157e424a4521 100644 --- a/test/parallel/test-stream-transform-constructor-set-methods.js +++ b/test/parallel/test-stream-transform-constructor-set-methods.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Transform = require('stream').Transform; diff --git a/test/parallel/test-stream-transform-objectmode-falsey-value.js b/test/parallel/test-stream-transform-objectmode-falsey-value.js index 762f0500ad3e60..7a40f8978f0655 100644 --- a/test/parallel/test-stream-transform-objectmode-falsey-value.js +++ b/test/parallel/test-stream-transform-objectmode-falsey-value.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream-transform-split-objectmode.js b/test/parallel/test-stream-transform-split-objectmode.js index 24833ece051e9e..5558c0a4f5274e 100644 --- a/test/parallel/test-stream-transform-split-objectmode.js +++ b/test/parallel/test-stream-transform-split-objectmode.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Transform = require('stream').Transform; diff --git a/test/parallel/test-stream-unshift-empty-chunk.js b/test/parallel/test-stream-unshift-empty-chunk.js index a7dcad425310b1..3af315ea837af0 100644 --- a/test/parallel/test-stream-unshift-empty-chunk.js +++ b/test/parallel/test-stream-unshift-empty-chunk.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // This test verifies that stream.unshift(Buffer(0)) or diff --git a/test/parallel/test-stream-unshift-read-race.js b/test/parallel/test-stream-unshift-read-race.js index 90f519b5b5d738..e56bfeb23f2465 100644 --- a/test/parallel/test-stream-unshift-read-race.js +++ b/test/parallel/test-stream-unshift-read-race.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // This test verifies that: @@ -13,7 +12,6 @@ var stream = require('stream'); var hwm = 10; var r = stream.Readable({ highWaterMark: hwm }); var chunks = 10; -var t = (chunks * 5); var data = new Buffer(chunks * hwm + Math.ceil(hwm / 2)); for (var i = 0; i < data.length; i++) { diff --git a/test/parallel/test-stream-wrap.js b/test/parallel/test-stream-wrap.js index e7a7ecddd2385d..69eda7b65d5b40 100644 --- a/test/parallel/test-stream-wrap.js +++ b/test/parallel/test-stream-wrap.js @@ -1,5 +1,4 @@ 'use strict'; -const common = require('../common'); const assert = require('assert'); const StreamWrap = require('_stream_wrap'); diff --git a/test/parallel/test-stream-writable-change-default-encoding.js b/test/parallel/test-stream-writable-change-default-encoding.js index a6fcda3e62a517..b8f9062a4fec2e 100644 --- a/test/parallel/test-stream-writable-change-default-encoding.js +++ b/test/parallel/test-stream-writable-change-default-encoding.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream-writable-constructor-set-methods.js b/test/parallel/test-stream-writable-constructor-set-methods.js index 47fc458ce9713b..4716a478efac49 100644 --- a/test/parallel/test-stream-writable-constructor-set-methods.js +++ b/test/parallel/test-stream-writable-constructor-set-methods.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Writable = require('stream').Writable; diff --git a/test/parallel/test-stream-writable-decoded-encoding.js b/test/parallel/test-stream-writable-decoded-encoding.js index b637838c0c65be..4df9ce84d78dc5 100644 --- a/test/parallel/test-stream-writable-decoded-encoding.js +++ b/test/parallel/test-stream-writable-decoded-encoding.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream-writev.js b/test/parallel/test-stream-writev.js index f73270f2ff53ba..04e5ce992fb014 100644 --- a/test/parallel/test-stream-writev.js +++ b/test/parallel/test-stream-writev.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var stream = require('stream'); @@ -30,11 +29,9 @@ function test(decode, uncork, multi, next) { function cnt(msg) { expectCount++; var expect = expectCount; - var called = false; return function(er) { if (er) throw er; - called = true; counter++; assert.equal(counter, expect); }; diff --git a/test/parallel/test-stream2-base64-single-char-read-end.js b/test/parallel/test-stream2-base64-single-char-read-end.js index e50ea5a0cc1370..18232576395667 100644 --- a/test/parallel/test-stream2-base64-single-char-read-end.js +++ b/test/parallel/test-stream2-base64-single-char-read-end.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var R = require('_stream_readable'); var W = require('_stream_writable'); var assert = require('assert'); diff --git a/test/parallel/test-stream2-compatibility.js b/test/parallel/test-stream2-compatibility.js index 9eab7b713bf167..96cc2c0570c656 100644 --- a/test/parallel/test-stream2-compatibility.js +++ b/test/parallel/test-stream2-compatibility.js @@ -1,10 +1,7 @@ 'use strict'; -var common = require('../common'); var R = require('_stream_readable'); var assert = require('assert'); - var util = require('util'); -var EE = require('events').EventEmitter; var ondataCalled = 0; @@ -25,7 +22,7 @@ TestReader.prototype._read = function(n) { this._buffer = new Buffer(0); }; -var reader = new TestReader(); +new TestReader(); setImmediate(function() { assert.equal(ondataCalled, 1); console.log('ok'); diff --git a/test/parallel/test-stream2-finish-pipe.js b/test/parallel/test-stream2-finish-pipe.js index 913bb7b0b4db09..1c6954b179c4b8 100644 --- a/test/parallel/test-stream2-finish-pipe.js +++ b/test/parallel/test-stream2-finish-pipe.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var stream = require('stream'); var Buffer = require('buffer').Buffer; diff --git a/test/parallel/test-stream2-large-read-stall.js b/test/parallel/test-stream2-large-read-stall.js index 4cd89599fee730..7a2489cc7f057c 100644 --- a/test/parallel/test-stream2-large-read-stall.js +++ b/test/parallel/test-stream2-large-read-stall.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // If everything aligns so that you do a read(n) of exactly the @@ -54,7 +53,7 @@ function push() { } // start the flow -var ret = r.read(0); +r.read(0); process.on('exit', function() { assert.equal(pushes, PUSHCOUNT + 1); diff --git a/test/parallel/test-stream2-objects.js b/test/parallel/test-stream2-objects.js index a2f554a0b8a004..eb6f7cc99a6fea 100644 --- a/test/parallel/test-stream2-objects.js +++ b/test/parallel/test-stream2-objects.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var Readable = require('_stream_readable'); var Writable = require('_stream_writable'); var assert = require('assert'); @@ -167,7 +166,7 @@ test('read(0) for object streams', function(t) { r.push('foobar'); r.push(null); - var v = r.read(0); + r.read(0); r.pipe(toArray(function(array) { assert.deepEqual(array, ['foobar']); diff --git a/test/parallel/test-stream2-pipe-error-handling.js b/test/parallel/test-stream2-pipe-error-handling.js index 9eddbdd90d00c3..9db009b7eb6888 100644 --- a/test/parallel/test-stream2-pipe-error-handling.js +++ b/test/parallel/test-stream2-pipe-error-handling.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream2-pipe-error-once-listener.js b/test/parallel/test-stream2-pipe-error-once-listener.js index f2ecb87ce97a75..4c27c31923d979 100644 --- a/test/parallel/test-stream2-pipe-error-once-listener.js +++ b/test/parallel/test-stream2-pipe-error-once-listener.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); var util = require('util'); var stream = require('stream'); diff --git a/test/parallel/test-stream2-push.js b/test/parallel/test-stream2-push.js index b58bce143585f4..be4fdcba4680e8 100644 --- a/test/parallel/test-stream2-push.js +++ b/test/parallel/test-stream2-push.js @@ -1,11 +1,9 @@ 'use strict'; -var common = require('../common'); var stream = require('stream'); var Readable = stream.Readable; var Writable = stream.Writable; var assert = require('assert'); -var util = require('util'); var EE = require('events').EventEmitter; diff --git a/test/parallel/test-stream2-read-sync-stack.js b/test/parallel/test-stream2-read-sync-stack.js index e912e1039ff558..1a5a9ed4bbf9bd 100644 --- a/test/parallel/test-stream2-read-sync-stack.js +++ b/test/parallel/test-stream2-read-sync-stack.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; var r = new Readable(); diff --git a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js index 8e4001f8022f1c..067a1d735afc4e 100644 --- a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js +++ b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; diff --git a/test/parallel/test-stream2-readable-from-list.js b/test/parallel/test-stream2-readable-from-list.js index a8d9fb38f25090..a021c0ac780996 100644 --- a/test/parallel/test-stream2-readable-from-list.js +++ b/test/parallel/test-stream2-readable-from-list.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var common = require('../common'); var fromList = require('_stream_readable')._fromList; // tiny node-tap lookalike. @@ -39,8 +38,6 @@ process.nextTick(run); test('buffers', function(t) { - // have a length - var len = 16; var list = [ new Buffer('foog'), new Buffer('bark'), new Buffer('bazy'), @@ -69,8 +66,6 @@ test('buffers', function(t) { }); test('strings', function(t) { - // have a length - var len = 16; var list = [ 'foog', 'bark', 'bazy', diff --git a/test/parallel/test-stream2-readable-legacy-drain.js b/test/parallel/test-stream2-readable-legacy-drain.js index 4218bace2b878f..58f8feb9911e79 100644 --- a/test/parallel/test-stream2-readable-legacy-drain.js +++ b/test/parallel/test-stream2-readable-legacy-drain.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Stream = require('stream'); diff --git a/test/parallel/test-stream2-readable-non-empty-end.js b/test/parallel/test-stream2-readable-non-empty-end.js index 46d6f92f2b9df2..a59d3b73fc1b90 100644 --- a/test/parallel/test-stream2-readable-non-empty-end.js +++ b/test/parallel/test-stream2-readable-non-empty-end.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var common = require('../common'); var Readable = require('_stream_readable'); var len = 0; diff --git a/test/parallel/test-stream2-readable-wrap-empty.js b/test/parallel/test-stream2-readable-wrap-empty.js index 60417ca893300d..d881c453772550 100644 --- a/test/parallel/test-stream2-readable-wrap-empty.js +++ b/test/parallel/test-stream2-readable-wrap-empty.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Readable = require('_stream_readable'); diff --git a/test/parallel/test-stream2-readable-wrap.js b/test/parallel/test-stream2-readable-wrap.js index 8e3e04b966010f..d89a505a306762 100644 --- a/test/parallel/test-stream2-readable-wrap.js +++ b/test/parallel/test-stream2-readable-wrap.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Readable = require('_stream_readable'); diff --git a/test/parallel/test-stream2-set-encoding.js b/test/parallel/test-stream2-set-encoding.js index ea9a315cb1a6e1..999524b4e81c9e 100644 --- a/test/parallel/test-stream2-set-encoding.js +++ b/test/parallel/test-stream2-set-encoding.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var R = require('_stream_readable'); var util = require('util'); diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js index e45c913c94f559..17138b2ac25b83 100644 --- a/test/parallel/test-stream2-transform.js +++ b/test/parallel/test-stream2-transform.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var common = require('../common'); var PassThrough = require('_stream_passthrough'); var Transform = require('_stream_transform'); @@ -303,13 +302,10 @@ test('passthrough event emission', function(t) { var pt = new PassThrough(); var emits = 0; pt.on('readable', function() { - var state = pt._readableState; console.error('>>> emit readable %d', emits); emits++; }); - var i = 0; - pt.write(new Buffer('foog')); console.error('need emit 0'); diff --git a/test/parallel/test-stream2-unpipe-leak.js b/test/parallel/test-stream2-unpipe-leak.js index 15b510e7f643cc..e84f1822195796 100644 --- a/test/parallel/test-stream2-unpipe-leak.js +++ b/test/parallel/test-stream2-unpipe-leak.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream2-writable.js b/test/parallel/test-stream2-writable.js index 1d87d7f920c052..8ef0468a28a846 100644 --- a/test/parallel/test-stream2-writable.js +++ b/test/parallel/test-stream2-writable.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var W = require('_stream_writable'); var D = require('_stream_duplex'); var assert = require('assert'); diff --git a/test/parallel/test-stream3-pause-then-read.js b/test/parallel/test-stream3-pause-then-read.js index 135629a243d66c..67ffb3e8a1e489 100644 --- a/test/parallel/test-stream3-pause-then-read.js +++ b/test/parallel/test-stream3-pause-then-read.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-string-decoder.js b/test/parallel/test-string-decoder.js index 0b22d3dd04efc9..222bfe30ed6610 100644 --- a/test/parallel/test-string-decoder.js +++ b/test/parallel/test-string-decoder.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var StringDecoder = require('string_decoder').StringDecoder; diff --git a/test/parallel/test-stringbytes-external.js b/test/parallel/test-stringbytes-external.js index be0c90d47f9f1f..c4a05d2c4670a0 100644 --- a/test/parallel/test-stringbytes-external.js +++ b/test/parallel/test-stringbytes-external.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // minimum string size to overflow into external string space var EXTERN_APEX = 0xFBEE9; diff --git a/test/parallel/test-timers-args.js b/test/parallel/test-timers-args.js index abb785ea0fc79c..f55c3158d4aeb9 100644 --- a/test/parallel/test-timers-args.js +++ b/test/parallel/test-timers-args.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); function range(n) { diff --git a/test/parallel/test-timers-immediate-queue.js b/test/parallel/test-timers-immediate-queue.js index a71472d46442ab..d23453fc3a58c5 100644 --- a/test/parallel/test-timers-immediate-queue.js +++ b/test/parallel/test-timers-immediate-queue.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // setImmediate should run clear its queued cbs once per event loop turn diff --git a/test/parallel/test-timers-immediate.js b/test/parallel/test-timers-immediate.js index bcfc4616ac6264..5fc1e06cf904dc 100644 --- a/test/parallel/test-timers-immediate.js +++ b/test/parallel/test-timers-immediate.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var immediateA = false, diff --git a/test/parallel/test-timers-linked-list.js b/test/parallel/test-timers-linked-list.js index 00b2129d126c4a..2dd527aaa7ecd8 100644 --- a/test/parallel/test-timers-linked-list.js +++ b/test/parallel/test-timers-linked-list.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var L = require('_linklist'); diff --git a/test/parallel/test-timers-non-integer-delay.js b/test/parallel/test-timers-non-integer-delay.js index a3e5420a5e4858..e01e9f909728ad 100644 --- a/test/parallel/test-timers-non-integer-delay.js +++ b/test/parallel/test-timers-non-integer-delay.js @@ -15,8 +15,6 @@ * it 100%. */ -var assert = require('assert'); - var TIMEOUT_DELAY = 1.1; var NB_TIMEOUTS_FIRED = 50; diff --git a/test/parallel/test-timers-now.js b/test/parallel/test-timers-now.js index 466bd064b8decf..af5914f399dc7b 100644 --- a/test/parallel/test-timers-now.js +++ b/test/parallel/test-timers-now.js @@ -1,6 +1,5 @@ 'use strict'; -const common = require('../common'); const assert = require('assert'); // Return value of Timer.now() should easily fit in a SMI right after start-up. diff --git a/test/parallel/test-timers-ordering.js b/test/parallel/test-timers-ordering.js index 730a78a072c663..0505cf688e0652 100644 --- a/test/parallel/test-timers-ordering.js +++ b/test/parallel/test-timers-ordering.js @@ -1,15 +1,12 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var Timer = process.binding('timer_wrap').Timer; -var i; - var N = 30; var last_i = 0; var last_ts = 0; -var start = Timer.now(); +Timer.now(); var f = function(i) { if (i <= N) { diff --git a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js index 081688cfa5e812..c9ca3eafd64ebf 100644 --- a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js +++ b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js @@ -5,7 +5,6 @@ */ const common = require('../common'); -const assert = require('assert'); const net = require('net'); const clients = []; diff --git a/test/parallel/test-timers-uncaught-exception.js b/test/parallel/test-timers-uncaught-exception.js index 794b3b923be1df..03aa73e1b7b07b 100644 --- a/test/parallel/test-timers-uncaught-exception.js +++ b/test/parallel/test-timers-uncaught-exception.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var exceptions = 0; diff --git a/test/parallel/test-timers-unref-active.js b/test/parallel/test-timers-unref-active.js index 08f28b0153fecb..a9169759dea4c6 100644 --- a/test/parallel/test-timers-unref-active.js +++ b/test/parallel/test-timers-unref-active.js @@ -15,7 +15,6 @@ * all 10 timeouts had the time to expire. */ -const common = require('../common'); const timers = require('timers'); const assert = require('assert'); diff --git a/test/parallel/test-timers-unref-call.js b/test/parallel/test-timers-unref-call.js index b348330d200d65..d380f76b5fc5f8 100644 --- a/test/parallel/test-timers-unref-call.js +++ b/test/parallel/test-timers-unref-call.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); - var Timer = process.binding('timer_wrap').Timer; Timer.now = function() { return ++Timer.now.ticks; }; Timer.now.ticks = 0; diff --git a/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js b/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js index aead4a4e7def64..835ba8f7e52765 100644 --- a/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js +++ b/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js @@ -10,7 +10,6 @@ * This behavior is a private implementation detail and should not be * considered public interface. */ -const common = require('../common'); const timers = require('timers'); const assert = require('assert'); diff --git a/test/parallel/test-timers-unref.js b/test/parallel/test-timers-unref.js index ab2e33acd21019..82bdd109f27838 100644 --- a/test/parallel/test-timers-unref.js +++ b/test/parallel/test-timers-unref.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var interval_fired = false, diff --git a/test/parallel/test-timers-zero-timeout.js b/test/parallel/test-timers-zero-timeout.js index 1c84814363a641..11ddf0b6c46134 100644 --- a/test/parallel/test-timers-zero-timeout.js +++ b/test/parallel/test-timers-zero-timeout.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // https://github.com/joyent/node/issues/2079 - zero timeout drops extra args @@ -7,7 +6,7 @@ var assert = require('assert'); var ncalled = 0; setTimeout(f, 0, 'foo', 'bar', 'baz'); - var timer = setTimeout(function() {}, 0); + setTimeout(function() {}, 0); function f(a, b, c) { assert.equal(a, 'foo'); diff --git a/test/parallel/test-timers.js b/test/parallel/test-timers.js index e784e262959d97..05a324a81315f5 100644 --- a/test/parallel/test-timers.js +++ b/test/parallel/test-timers.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var inputs = [ diff --git a/test/parallel/test-tls-0-dns-altname.js b/test/parallel/test-tls-0-dns-altname.js index 61458142bc0115..d28b2c9a923c5a 100644 --- a/test/parallel/test-tls-0-dns-altname.js +++ b/test/parallel/test-tls-0-dns-altname.js @@ -7,10 +7,7 @@ if (!common.hasCrypto) { return; } var tls = require('tls'); - var fs = require('fs'); -var net = require('net'); - var common = require('../common'); var requests = 0; diff --git a/test/parallel/test-tls-async-cb-after-socket-end.js b/test/parallel/test-tls-async-cb-after-socket-end.js index 87258cb32c5085..919680f827f159 100644 --- a/test/parallel/test-tls-async-cb-after-socket-end.js +++ b/test/parallel/test-tls-async-cb-after-socket-end.js @@ -2,7 +2,6 @@ var common = require('../common'); -var assert = require('assert'); var path = require('path'); var fs = require('fs'); var constants = require('constants'); diff --git a/test/parallel/test-tls-client-default-ciphers.js b/test/parallel/test-tls-client-default-ciphers.js index e38671fd6f9de1..9905fc45bdcd24 100644 --- a/test/parallel/test-tls-client-default-ciphers.js +++ b/test/parallel/test-tls-client-default-ciphers.js @@ -19,7 +19,7 @@ function test1() { }; try { - var s = tls.connect(common.PORT); + tls.connect(common.PORT); } catch (e) { assert(e instanceof Done); } diff --git a/test/parallel/test-tls-close-error.js b/test/parallel/test-tls-close-error.js index 5c5a797c280a7d..bd38cb55f7a17b 100644 --- a/test/parallel/test-tls-close-error.js +++ b/test/parallel/test-tls-close-error.js @@ -10,7 +10,6 @@ if (!common.hasCrypto) { var tls = require('tls'); var fs = require('fs'); -var net = require('net'); var errorCount = 0; var closeCount = 0; diff --git a/test/parallel/test-tls-close-notify.js b/test/parallel/test-tls-close-notify.js index 5cc3021ab8dd7e..d7dea81517dfb9 100644 --- a/test/parallel/test-tls-close-notify.js +++ b/test/parallel/test-tls-close-notify.js @@ -7,9 +7,7 @@ if (!common.hasCrypto) { return; } var tls = require('tls'); - var fs = require('fs'); -var net = require('net'); var ended = 0; diff --git a/test/parallel/test-tls-destroy-whilst-write.js b/test/parallel/test-tls-destroy-whilst-write.js index f42ed1d4ea7702..26c20264735926 100644 --- a/test/parallel/test-tls-destroy-whilst-write.js +++ b/test/parallel/test-tls-destroy-whilst-write.js @@ -1,5 +1,4 @@ 'use strict'; -var assert = require('assert'); var common = require('../common'); if (!common.hasCrypto) { diff --git a/test/parallel/test-tls-fast-writing.js b/test/parallel/test-tls-fast-writing.js index 009fa40b631ee5..1f65391480d59d 100644 --- a/test/parallel/test-tls-fast-writing.js +++ b/test/parallel/test-tls-fast-writing.js @@ -20,7 +20,7 @@ var server = tls.createServer(options, onconnection); var gotChunk = false; var gotDrain = false; -var timer = setTimeout(function() { +setTimeout(function() { console.log('not ok - timed out'); process.exit(1); }, common.platformTimeout(500)); diff --git a/test/parallel/test-tls-handshake-error.js b/test/parallel/test-tls-handshake-error.js index f33177455f8943..371eb6ea22b8f2 100644 --- a/test/parallel/test-tls-handshake-error.js +++ b/test/parallel/test-tls-handshake-error.js @@ -8,9 +8,7 @@ if (!common.hasCrypto) { return; } var tls = require('tls'); - var fs = require('fs'); -var net = require('net'); var errorCount = 0; var closeCount = 0; diff --git a/test/parallel/test-tls-handshake-nohang.js b/test/parallel/test-tls-handshake-nohang.js index ae07551ef98088..374ac02a2f45b5 100644 --- a/test/parallel/test-tls-handshake-nohang.js +++ b/test/parallel/test-tls-handshake-nohang.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); diff --git a/test/parallel/test-tls-inception.js b/test/parallel/test-tls-inception.js index df03cf934fcef6..dbda70028b9dcc 100644 --- a/test/parallel/test-tls-inception.js +++ b/test/parallel/test-tls-inception.js @@ -12,7 +12,7 @@ var fs = require('fs'); var path = require('path'); var net = require('net'); -var options, a, b, portA, portB; +var options, a, b; var gotHello = false; options = { diff --git a/test/parallel/test-tls-invoke-queued.js b/test/parallel/test-tls-invoke-queued.js index f833108ea3f9e0..9c05325f9e3e3a 100644 --- a/test/parallel/test-tls-invoke-queued.js +++ b/test/parallel/test-tls-invoke-queued.js @@ -7,10 +7,7 @@ if (!common.hasCrypto) { return; } var tls = require('tls'); - var fs = require('fs'); -var net = require('net'); - var received = ''; var ended = 0; diff --git a/test/parallel/test-tls-key-mismatch.js b/test/parallel/test-tls-key-mismatch.js index f7919c545aefb1..2e17a4931078c7 100644 --- a/test/parallel/test-tls-key-mismatch.js +++ b/test/parallel/test-tls-key-mismatch.js @@ -14,8 +14,6 @@ var options = { cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem') }; -var cert = null; - assert.throws(function() { tls.createSecureContext(options); }); diff --git a/test/parallel/test-tls-legacy-onselect.js b/test/parallel/test-tls-legacy-onselect.js index 6f1e9a91a8344c..d3b20d5d8a4cef 100644 --- a/test/parallel/test-tls-legacy-onselect.js +++ b/test/parallel/test-tls-legacy-onselect.js @@ -9,18 +9,8 @@ if (!common.hasCrypto) { var tls = require('tls'); var net = require('net'); -var fs = require('fs'); - var success = false; -function filenamePEM(n) { - return require('path').join(common.fixturesDir, 'keys', n + '.pem'); -} - -function loadPEM(n) { - return fs.readFileSync(filenamePEM(n)); -} - var server = net.Server(function(raw) { var pair = tls.createSecurePair(null, true, false, false); pair.on('error', function() {}); diff --git a/test/parallel/test-tls-max-send-fragment.js b/test/parallel/test-tls-max-send-fragment.js index cc9413b81e78d6..b730f46db02ebb 100644 --- a/test/parallel/test-tls-max-send-fragment.js +++ b/test/parallel/test-tls-max-send-fragment.js @@ -7,10 +7,7 @@ if (!common.hasCrypto) { return; } var tls = require('tls'); - var fs = require('fs'); -var net = require('net'); - var common = require('../common'); var buf = new Buffer(10000); diff --git a/test/parallel/test-tls-ocsp-callback.js b/test/parallel/test-tls-ocsp-callback.js index d970b2ab013446..64b6a6c31e7244 100644 --- a/test/parallel/test-tls-ocsp-callback.js +++ b/test/parallel/test-tls-ocsp-callback.js @@ -45,7 +45,6 @@ function test(testOptions, cb) { var clientSecure = 0; var ocspCount = 0; var ocspResponse; - var session; var server = tls.createServer(options, function(cleartext) { cleartext.on('error', function(er) { diff --git a/test/parallel/test-tls-peer-certificate-encoding.js b/test/parallel/test-tls-peer-certificate-encoding.js index 771c8181c8c3b6..0957f75c8589bd 100644 --- a/test/parallel/test-tls-peer-certificate-encoding.js +++ b/test/parallel/test-tls-peer-certificate-encoding.js @@ -11,7 +11,6 @@ var tls = require('tls'); var fs = require('fs'); var util = require('util'); var join = require('path').join; -var spawn = require('child_process').spawn; var options = { key: fs.readFileSync(join(common.fixturesDir, 'keys', 'agent5-key.pem')), diff --git a/test/parallel/test-tls-peer-certificate-multi-keys.js b/test/parallel/test-tls-peer-certificate-multi-keys.js index 3cfd6420cdf507..5b0686558070ed 100644 --- a/test/parallel/test-tls-peer-certificate-multi-keys.js +++ b/test/parallel/test-tls-peer-certificate-multi-keys.js @@ -11,7 +11,6 @@ var tls = require('tls'); var fs = require('fs'); var util = require('util'); var join = require('path').join; -var spawn = require('child_process').spawn; var options = { key: fs.readFileSync(join(common.fixturesDir, 'agent.key')), diff --git a/test/parallel/test-tls-peer-certificate.js b/test/parallel/test-tls-peer-certificate.js index 3c25af19c87e88..5a3a31355bc787 100644 --- a/test/parallel/test-tls-peer-certificate.js +++ b/test/parallel/test-tls-peer-certificate.js @@ -11,7 +11,6 @@ var tls = require('tls'); var fs = require('fs'); var util = require('util'); var join = require('path').join; -var spawn = require('child_process').spawn; var options = { key: fs.readFileSync(join(common.fixturesDir, 'keys', 'agent1-key.pem')), diff --git a/test/parallel/test-tls-request-timeout.js b/test/parallel/test-tls-request-timeout.js index a9b1c78c91a0bf..0db2a613afc9e4 100644 --- a/test/parallel/test-tls-request-timeout.js +++ b/test/parallel/test-tls-request-timeout.js @@ -29,7 +29,7 @@ var server = tls.Server(options, function(socket) { }); server.listen(common.PORT, function() { - var socket = tls.connect({ + tls.connect({ port: common.PORT, rejectUnauthorized: false }); diff --git a/test/parallel/test-tls-ticket-cluster.js b/test/parallel/test-tls-ticket-cluster.js index fc0f1d5e858d00..1fd1776ca8199f 100644 --- a/test/parallel/test-tls-ticket-cluster.js +++ b/test/parallel/test-tls-ticket-cluster.js @@ -42,7 +42,6 @@ if (cluster.isMaster) { function fork() { var worker = cluster.fork(); - var workerReqCount = 0; worker.on('message', function(msg) { console.error('[master] got %j', msg); if (msg === 'reused') { diff --git a/test/parallel/test-tty-wrap.js b/test/parallel/test-tty-wrap.js index dbe7b6890fd218..8f3829afc6dd84 100644 --- a/test/parallel/test-tty-wrap.js +++ b/test/parallel/test-tty-wrap.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var TTY = process.binding('tty_wrap').TTY; diff --git a/test/parallel/test-url.js b/test/parallel/test-url.js index 5098c7e46ab6e6..3b24143a01fd89 100644 --- a/test/parallel/test-url.js +++ b/test/parallel/test-url.js @@ -1,10 +1,7 @@ /* eslint-disable max-len */ 'use strict'; -var common = require('../common'); var assert = require('assert'); - -var url = require('url'), - util = require('util'); +var url = require('url'); // URLs to parse, and expected data // { url : parsed } @@ -1515,9 +1512,6 @@ relativeTests2.forEach(function(relativeTest) { //if format and parse are inverse operations then //resolveObject(parse(x), y) == parse(resolve(x, y)) -//host and hostname are special, in this case a '' value is important -var emptyIsImportant = {'host': true, 'hostname': ''}; - //format: [from, path, expected] relativeTests.forEach(function(relativeTest) { var actual = url.resolveObject(url.parse(relativeTest[0]), relativeTest[1]), diff --git a/test/parallel/test-utf8-scripts.js b/test/parallel/test-utf8-scripts.js index 3a891283509b9e..8338ee68ee583e 100644 --- a/test/parallel/test-utf8-scripts.js +++ b/test/parallel/test-utf8-scripts.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // üäö diff --git a/test/parallel/test-util-format.js b/test/parallel/test-util-format.js index 6761671e1997bd..28a9419ebd3eef 100644 --- a/test/parallel/test-util-format.js +++ b/test/parallel/test-util-format.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var util = require('util'); var symbol = Symbol('foo'); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 58a4c8a2f2b142..53640e0fd99bfe 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-util.js b/test/parallel/test-util.js index 79e104546b7f37..c2cd058e739859 100644 --- a/test/parallel/test-util.js +++ b/test/parallel/test-util.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var util = require('util'); var context = require('vm').runInNewContext; diff --git a/test/parallel/test-v8-flag-type-check.js b/test/parallel/test-v8-flag-type-check.js index 68bf30dba3cdbc..ef2b241d99466d 100644 --- a/test/parallel/test-v8-flag-type-check.js +++ b/test/parallel/test-v8-flag-type-check.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var v8 = require('v8'); diff --git a/test/parallel/test-v8-flags.js b/test/parallel/test-v8-flags.js index d21cbc6c2635a5..02acabf4fc78a8 100644 --- a/test/parallel/test-v8-flags.js +++ b/test/parallel/test-v8-flags.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var v8 = require('v8'); var vm = require('vm'); diff --git a/test/parallel/test-v8-stats.js b/test/parallel/test-v8-stats.js index fc4a6df30f8ed8..935e13df6600c3 100644 --- a/test/parallel/test-v8-stats.js +++ b/test/parallel/test-v8-stats.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var v8 = require('v8'); diff --git a/test/parallel/test-vm-basic.js b/test/parallel/test-vm-basic.js index 96c615c44af10c..8d505b7cab5ac7 100644 --- a/test/parallel/test-vm-basic.js +++ b/test/parallel/test-vm-basic.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-context-async-script.js b/test/parallel/test-vm-context-async-script.js index e146d48343aa60..314bd9de55b268 100644 --- a/test/parallel/test-vm-context-async-script.js +++ b/test/parallel/test-vm-context-async-script.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-context-property-forwarding.js b/test/parallel/test-vm-context-property-forwarding.js index 5fcd64b8ba9094..951fd7fd860506 100644 --- a/test/parallel/test-vm-context-property-forwarding.js +++ b/test/parallel/test-vm-context-property-forwarding.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js index 45e19e6638892e..d6a48dd32e8a0b 100644 --- a/test/parallel/test-vm-context.js +++ b/test/parallel/test-vm-context.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-create-and-run-in-context.js b/test/parallel/test-vm-create-and-run-in-context.js index 01df6ad4531e4a..7ca1949590fdbb 100644 --- a/test/parallel/test-vm-create-and-run-in-context.js +++ b/test/parallel/test-vm-create-and-run-in-context.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-create-context-accessors.js b/test/parallel/test-vm-create-context-accessors.js index 678cf3fbd2128e..a1aa4f3ef9a0bb 100644 --- a/test/parallel/test-vm-create-context-accessors.js +++ b/test/parallel/test-vm-create-context-accessors.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-create-context-arg.js b/test/parallel/test-vm-create-context-arg.js index d44eeec18decd5..2f2b862d183795 100644 --- a/test/parallel/test-vm-create-context-arg.js +++ b/test/parallel/test-vm-create-context-arg.js @@ -1,15 +1,14 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); assert.throws(function() { - var ctx = vm.createContext('string is not supported'); + vm.createContext('string is not supported'); }, TypeError); assert.doesNotThrow(function() { - var ctx = vm.createContext({ a: 1 }); - ctx = vm.createContext([0, 1, 2, 3]); + vm.createContext({ a: 1 }); + vm.createContext([0, 1, 2, 3]); }); assert.doesNotThrow(function() { diff --git a/test/parallel/test-vm-create-context-circular-reference.js b/test/parallel/test-vm-create-context-circular-reference.js index cb6a90dcaef321..28952d25f05f3f 100644 --- a/test/parallel/test-vm-create-context-circular-reference.js +++ b/test/parallel/test-vm-create-context-circular-reference.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-cross-context.js b/test/parallel/test-vm-cross-context.js index 20a3792b28578e..8900b4f57e86ea 100644 --- a/test/parallel/test-vm-cross-context.js +++ b/test/parallel/test-vm-cross-context.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-function-declaration.js b/test/parallel/test-vm-function-declaration.js index 5ff194e12dd8d8..2a07e2009ebaa7 100644 --- a/test/parallel/test-vm-function-declaration.js +++ b/test/parallel/test-vm-function-declaration.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-global-define-property.js b/test/parallel/test-vm-global-define-property.js index f7f3e4f3df7d76..c19ed900265302 100644 --- a/test/parallel/test-vm-global-define-property.js +++ b/test/parallel/test-vm-global-define-property.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-global-identity.js b/test/parallel/test-vm-global-identity.js index 647edb22b44db0..3ddfc0485e541a 100644 --- a/test/parallel/test-vm-global-identity.js +++ b/test/parallel/test-vm-global-identity.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-harmony-proxies.js b/test/parallel/test-vm-harmony-proxies.js index 2f008615ebaf54..4615b1698b0883 100644 --- a/test/parallel/test-vm-harmony-proxies.js +++ b/test/parallel/test-vm-harmony-proxies.js @@ -1,19 +1,18 @@ 'use strict'; // Flags: --harmony_proxies -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); // src/node_contextify.cc filters out the Proxy object from the parent // context. Make sure that the new context has a Proxy object of its own. var sandbox = {}; -var result = vm.runInNewContext('this.Proxy = Proxy', sandbox); +vm.runInNewContext('this.Proxy = Proxy', sandbox); assert(typeof sandbox.Proxy === 'object'); assert(sandbox.Proxy !== Proxy); // Unless we copy the Proxy object explicitly, of course. var sandbox = { Proxy: Proxy }; -var result = vm.runInNewContext('this.Proxy = Proxy', sandbox); +vm.runInNewContext('this.Proxy = Proxy', sandbox); assert(typeof sandbox.Proxy === 'object'); assert(sandbox.Proxy === Proxy); diff --git a/test/parallel/test-vm-harmony-symbols.js b/test/parallel/test-vm-harmony-symbols.js index 86fde1b978ffb2..6f1b83a4ee747f 100644 --- a/test/parallel/test-vm-harmony-symbols.js +++ b/test/parallel/test-vm-harmony-symbols.js @@ -1,16 +1,15 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); // The sandbox should have its own Symbol constructor. var sandbox = {}; -var result = vm.runInNewContext('this.Symbol = Symbol', sandbox); +vm.runInNewContext('this.Symbol = Symbol', sandbox); assert(typeof sandbox.Symbol === 'function'); assert(sandbox.Symbol !== Symbol); // Unless we copy the Symbol constructor explicitly, of course. var sandbox = { Symbol: Symbol }; -var result = vm.runInNewContext('this.Symbol = Symbol', sandbox); +vm.runInNewContext('this.Symbol = Symbol', sandbox); assert(typeof sandbox.Symbol === 'function'); assert(sandbox.Symbol === Symbol); diff --git a/test/parallel/test-vm-is-context.js b/test/parallel/test-vm-is-context.js index 5a46a452b91634..9878caa6077512 100644 --- a/test/parallel/test-vm-is-context.js +++ b/test/parallel/test-vm-is-context.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-new-script-new-context.js b/test/parallel/test-vm-new-script-new-context.js index e3cc6e91cb432a..33f3603a61eb8f 100644 --- a/test/parallel/test-vm-new-script-new-context.js +++ b/test/parallel/test-vm-new-script-new-context.js @@ -21,7 +21,6 @@ assert.throws(function() { console.error('undefined reference'); -var error; script = new Script('foo.bar = 5;'); assert.throws(function() { script.runInNewContext(); @@ -41,7 +40,7 @@ code = 'foo = 1;' + foo = 2; obj = { foo: 0, baz: 3 }; script = new Script(code); -var baz = script.runInNewContext(obj); +script.runInNewContext(obj); assert.equal(1, obj.foo); assert.equal(2, obj.bar); assert.equal(2, foo); diff --git a/test/parallel/test-vm-preserves-property.js b/test/parallel/test-vm-preserves-property.js index 85ce2d6e8165c8..b111b18d358a95 100644 --- a/test/parallel/test-vm-preserves-property.js +++ b/test/parallel/test-vm-preserves-property.js @@ -1,6 +1,5 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-run-in-new-context.js b/test/parallel/test-vm-run-in-new-context.js index da14a041face31..882d6844de7f3b 100644 --- a/test/parallel/test-vm-run-in-new-context.js +++ b/test/parallel/test-vm-run-in-new-context.js @@ -29,7 +29,7 @@ code = 'foo = 1;' + 'if (baz !== 3) throw new Error(\'test fail\');'; foo = 2; obj = { foo: 0, baz: 3 }; -var baz = vm.runInNewContext(code, obj); +vm.runInNewContext(code, obj); assert.equal(1, obj.foo); assert.equal(2, obj.bar); assert.equal(2, foo); diff --git a/test/parallel/test-vm-static-this.js b/test/parallel/test-vm-static-this.js index fb9cb764f8422c..d8cc825e3b74f1 100644 --- a/test/parallel/test-vm-static-this.js +++ b/test/parallel/test-vm-static-this.js @@ -25,7 +25,7 @@ code = 'foo = 1;' + 'if (typeof baz !== \'undefined\') throw new Error(\'test fail\');'; foo = 2; obj = { foo: 0, baz: 3 }; -var baz = vm.runInThisContext(code); +vm.runInThisContext(code); assert.equal(0, obj.foo); assert.equal(2, bar); assert.equal(1, foo); diff --git a/test/parallel/test-vm-symbols.js b/test/parallel/test-vm-symbols.js index d7d0ffe3af6157..10f79951dda8ba 100644 --- a/test/parallel/test-vm-symbols.js +++ b/test/parallel/test-vm-symbols.js @@ -1,6 +1,5 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-syntax-error-message.js b/test/parallel/test-vm-syntax-error-message.js index 4b48b0d474a88d..1d94e1679ba75f 100644 --- a/test/parallel/test-vm-syntax-error-message.js +++ b/test/parallel/test-vm-syntax-error-message.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var child_process = require('child_process'); diff --git a/test/parallel/test-vm-timeout.js b/test/parallel/test-vm-timeout.js index e9511e59230a84..5a92ac5104a591 100644 --- a/test/parallel/test-vm-timeout.js +++ b/test/parallel/test-vm-timeout.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-writedouble.js b/test/parallel/test-writedouble.js index 2a9ab11107f147..19b3f5461a6568 100644 --- a/test/parallel/test-writedouble.js +++ b/test/parallel/test-writedouble.js @@ -2,7 +2,6 @@ /* * Tests to verify we're writing doubles correctly */ -var common = require('../common'); var ASSERT = require('assert'); function test(clazz) { diff --git a/test/parallel/test-writefloat.js b/test/parallel/test-writefloat.js index 948bf4910208a5..688fba72d668f1 100644 --- a/test/parallel/test-writefloat.js +++ b/test/parallel/test-writefloat.js @@ -2,7 +2,6 @@ /* * Tests to verify we're writing floats correctly */ -var common = require('../common'); var ASSERT = require('assert'); function test(clazz) { diff --git a/test/parallel/test-writeint.js b/test/parallel/test-writeint.js index ee981a157ad761..919cf329e14d37 100644 --- a/test/parallel/test-writeint.js +++ b/test/parallel/test-writeint.js @@ -2,7 +2,6 @@ /* * Tests to verify we're writing signed integers correctly */ -var common = require('../common'); var ASSERT = require('assert'); function test8(clazz) { diff --git a/test/parallel/test-writeuint.js b/test/parallel/test-writeuint.js index 22579ceecaef2d..46e9c0478037b4 100644 --- a/test/parallel/test-writeuint.js +++ b/test/parallel/test-writeuint.js @@ -2,7 +2,6 @@ /* * A battery of tests to help us read a series of uints */ -var common = require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-zlib-close-after-write.js b/test/parallel/test-zlib-close-after-write.js index c02ff33fb5eb63..3fcecef9473063 100644 --- a/test/parallel/test-zlib-close-after-write.js +++ b/test/parallel/test-zlib-close-after-write.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-const.js b/test/parallel/test-zlib-const.js index 511eca613a5229..ff0def8439d076 100644 --- a/test/parallel/test-zlib-const.js +++ b/test/parallel/test-zlib-const.js @@ -1,5 +1,4 @@ /* eslint-disable strict */ -var common = require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-convenience-methods.js b/test/parallel/test-zlib-convenience-methods.js index 5808bdf04a8f14..a6584c2708ad79 100644 --- a/test/parallel/test-zlib-convenience-methods.js +++ b/test/parallel/test-zlib-convenience-methods.js @@ -1,7 +1,6 @@ 'use strict'; // test convenience methods with and without options supplied -var common = require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-dictionary.js b/test/parallel/test-zlib-dictionary.js index 109f4273f767d0..ec5c882b1fb6a5 100644 --- a/test/parallel/test-zlib-dictionary.js +++ b/test/parallel/test-zlib-dictionary.js @@ -1,10 +1,8 @@ 'use strict'; // test compression/decompression with dictionary -var common = require('../common'); var assert = require('assert'); var zlib = require('zlib'); -var path = require('path'); var spdyDict = new Buffer([ 'optionsgetheadpostputdeletetraceacceptaccept-charsetaccept-encodingaccept-', diff --git a/test/parallel/test-zlib-from-string.js b/test/parallel/test-zlib-from-string.js index 49f4d139c148d9..6665c39e8f0560 100644 --- a/test/parallel/test-zlib-from-string.js +++ b/test/parallel/test-zlib-from-string.js @@ -1,7 +1,6 @@ 'use strict'; // test compressing and uncompressing a string with zlib -var common = require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-invalid-input.js b/test/parallel/test-zlib-invalid-input.js index e1e81bacc1a499..732519401b611d 100644 --- a/test/parallel/test-zlib-invalid-input.js +++ b/test/parallel/test-zlib-invalid-input.js @@ -1,9 +1,8 @@ 'use strict'; // test uncompressing invalid input -var common = require('../common'), - assert = require('assert'), - zlib = require('zlib'); +var assert = require('assert'); +var zlib = require('zlib'); var nonStringInputs = [1, true, {a: 1}, ['a']]; diff --git a/test/parallel/test-zlib-write-after-close.js b/test/parallel/test-zlib-write-after-close.js index a1d9adb6d9b996..2d5c547397a333 100644 --- a/test/parallel/test-zlib-write-after-close.js +++ b/test/parallel/test-zlib-write-after-close.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-write-after-flush.js b/test/parallel/test-zlib-write-after-flush.js index 4c53ca49ebf758..60d92694cf2f3a 100644 --- a/test/parallel/test-zlib-write-after-flush.js +++ b/test/parallel/test-zlib-write-after-flush.js @@ -1,8 +1,6 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var zlib = require('zlib'); -var fs = require('fs'); var gzip = zlib.createGzip(); var gunz = zlib.createUnzip(); diff --git a/test/parallel/test-zlib-zero-byte.js b/test/parallel/test-zlib-zero-byte.js index 9aa260a7f3149d..2ac1a1aceaf088 100644 --- a/test/parallel/test-zlib-zero-byte.js +++ b/test/parallel/test-zlib-zero-byte.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/pummel/test-crypto-dh.js b/test/pummel/test-crypto-dh.js index a223e45c866bcd..62b31b820242cf 100644 --- a/test/pummel/test-crypto-dh.js +++ b/test/pummel/test-crypto-dh.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); try { diff --git a/test/pummel/test-dtrace-jsstack.js b/test/pummel/test-dtrace-jsstack.js index 67194a3dd77f53..437e5d6c59187e 100644 --- a/test/pummel/test-dtrace-jsstack.js +++ b/test/pummel/test-dtrace-jsstack.js @@ -1,8 +1,6 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var os = require('os'); -var util = require('util'); if (os.type() != 'SunOS') { console.log('1..0 # Skipped: no DTRACE support'); @@ -13,7 +11,6 @@ if (os.type() != 'SunOS') { * Some functions to create a recognizable stack. */ var frames = [ 'stalloogle', 'bagnoogle', 'doogle' ]; -var expected; var stalloogle = function(str) { expected = str; @@ -34,8 +31,6 @@ var doogle = function() { }; var spawn = require('child_process').spawn; -var prefix = '/var/tmp/node'; -var corefile = prefix + '.' + process.pid; /* * We're going to use DTrace to stop us, gcore us, and set us running again diff --git a/test/pummel/test-fs-watch-file.js b/test/pummel/test-fs-watch-file.js index 7b57803dd4ec93..4e08e9e9d1cc9b 100644 --- a/test/pummel/test-fs-watch-file.js +++ b/test/pummel/test-fs-watch-file.js @@ -9,7 +9,6 @@ var watchSeenTwo = 0; var watchSeenThree = 0; var watchSeenFour = 0; -var startDir = process.cwd(); var testDir = common.tmpDir; var filenameOne = 'watch.txt'; diff --git a/test/pummel/test-http-client-reconnect-bug.js b/test/pummel/test-http-client-reconnect-bug.js index bd852e45f19410..0ff8e17c8e97cc 100644 --- a/test/pummel/test-http-client-reconnect-bug.js +++ b/test/pummel/test-http-client-reconnect-bug.js @@ -2,9 +2,8 @@ var common = require('../common'); var assert = require('assert'); -var net = require('net'), - util = require('util'), - http = require('http'); +var net = require('net'); +var http = require('http'); var errorCount = 0; var eofCount = 0; diff --git a/test/pummel/test-http-upload-timeout.js b/test/pummel/test-http-upload-timeout.js index 08132e3c7594d1..431222dca3808c 100644 --- a/test/pummel/test-http-upload-timeout.js +++ b/test/pummel/test-http-upload-timeout.js @@ -2,11 +2,10 @@ // This tests setTimeout() by having multiple clients connecting and sending // data in random intervals. Clients are also randomly disconnecting until there // are no more clients left. If no false timeout occurs, this test has passed. -var common = require('../common'), - assert = require('assert'), - http = require('http'), - server = http.createServer(), - connections = 0; +var common = require('../common'); +var http = require('http'); +var server = http.createServer(); +var connections = 0; server.on('request', function(req, res) { req.socket.setTimeout(1000); diff --git a/test/pummel/test-https-no-reader.js b/test/pummel/test-https-no-reader.js index 753687e67a5589..d9d2b64cc73d62 100644 --- a/test/pummel/test-https-no-reader.js +++ b/test/pummel/test-https-no-reader.js @@ -18,8 +18,6 @@ var options = { }; var buf = new Buffer(1024 * 1024); -var sent = 0; -var received = 0; var server = https.createServer(options, function(req, res) { res.writeHead(200); @@ -30,7 +28,6 @@ var server = https.createServer(options, function(req, res) { }); server.listen(common.PORT, function() { - var resumed = false; var req = https.request({ method: 'POST', port: common.PORT, diff --git a/test/pummel/test-keep-alive.js b/test/pummel/test-keep-alive.js index c2ec7fd81f1691..46190555b27263 100644 --- a/test/pummel/test-keep-alive.js +++ b/test/pummel/test-keep-alive.js @@ -5,7 +5,6 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; var http = require('http'); -var path = require('path'); var url = require('url'); if (common.isWindows) { diff --git a/test/pummel/test-next-tick-infinite-calls.js b/test/pummel/test-next-tick-infinite-calls.js index d4fdb3496423eb..da174cbb61bb6f 100644 --- a/test/pummel/test-next-tick-infinite-calls.js +++ b/test/pummel/test-next-tick-infinite-calls.js @@ -1,6 +1,4 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); var complete = 0; diff --git a/test/pummel/test-process-hrtime.js b/test/pummel/test-process-hrtime.js index 4fd66c03907aac..7622c803fea991 100644 --- a/test/pummel/test-process-hrtime.js +++ b/test/pummel/test-process-hrtime.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var start = process.hrtime(); diff --git a/test/pummel/test-process-uptime.js b/test/pummel/test-process-uptime.js index a80806c2099cb1..f0519dc00a57f0 100644 --- a/test/pummel/test-process-uptime.js +++ b/test/pummel/test-process-uptime.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); console.error(process.uptime()); diff --git a/test/pummel/test-regress-GH-892.js b/test/pummel/test-regress-GH-892.js index 67f9dd95aebe5f..ea129e9be1168b 100644 --- a/test/pummel/test-regress-GH-892.js +++ b/test/pummel/test-regress-GH-892.js @@ -17,12 +17,7 @@ var https = require('https'); var fs = require('fs'); -var PORT = 8000; - - var bytesExpected = 1024 * 1024 * 32; -var gotResponse = false; - var started = false; var childScript = require('path').join(common.fixturesDir, 'GH-892-request.js'); diff --git a/test/pummel/test-stream-pipe-multi.js b/test/pummel/test-stream-pipe-multi.js index 807e3c1415154e..e961c4d63aca89 100644 --- a/test/pummel/test-stream-pipe-multi.js +++ b/test/pummel/test-stream-pipe-multi.js @@ -2,7 +2,6 @@ // Test that having a bunch of streams piping in parallel // doesn't break anything. -var common = require('../common'); var assert = require('assert'); var Stream = require('stream').Stream; var rr = []; diff --git a/test/pummel/test-stream2-basic.js b/test/pummel/test-stream2-basic.js index fe921dc0058374..ab7f6758d877d1 100644 --- a/test/pummel/test-stream2-basic.js +++ b/test/pummel/test-stream2-basic.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var R = require('_stream_readable'); var assert = require('assert'); @@ -157,7 +156,6 @@ test('pipe', function(t) { 'xxxxx' ]; var w = new TestWriter(); - var flush = true; w.on('end', function(received) { t.same(received, expect); @@ -439,7 +437,6 @@ test('adding readable triggers data flow', function(t) { r.push(new Buffer('asdf')); }; - var called = false; r.on('readable', function() { onReadable = true; r.read(); diff --git a/test/pummel/test-timer-wrap.js b/test/pummel/test-timer-wrap.js index 62ba69d3fde033..ab9d07b8e0ee55 100644 --- a/test/pummel/test-timer-wrap.js +++ b/test/pummel/test-timer-wrap.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var timeouts = 0; diff --git a/test/pummel/test-timer-wrap2.js b/test/pummel/test-timer-wrap2.js index b289a85644a068..39d577eca8dc52 100644 --- a/test/pummel/test-timer-wrap2.js +++ b/test/pummel/test-timer-wrap2.js @@ -1,9 +1,7 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); // Test that allocating a timer does not increase the loop's reference // count. var Timer = process.binding('timer_wrap').Timer; -var t = new Timer(); +new Timer(); diff --git a/test/pummel/test-timers.js b/test/pummel/test-timers.js index 2225da91edcf5f..5db625c36f8960 100644 --- a/test/pummel/test-timers.js +++ b/test/pummel/test-timers.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var WINDOW = 200; // why is does this need to be so big? @@ -91,12 +90,12 @@ function t() { expectedTimeouts--; } -var w = setTimeout(t, 200); -var x = setTimeout(t, 200); +setTimeout(t, 200); +setTimeout(t, 200); var y = setTimeout(t, 200); clearTimeout(y); -var z = setTimeout(t, 200); +setTimeout(t, 200); clearTimeout(y); diff --git a/test/pummel/test-tls-securepair-client.js b/test/pummel/test-tls-securepair-client.js index aaf8e628d6a2bc..3d33ef8f21623f 100644 --- a/test/pummel/test-tls-securepair-client.js +++ b/test/pummel/test-tls-securepair-client.js @@ -17,9 +17,7 @@ var join = require('path').join; var net = require('net'); var assert = require('assert'); var fs = require('fs'); -var crypto = require('crypto'); var tls = require('tls'); -var exec = require('child_process').exec; var spawn = require('child_process').spawn; test1(); @@ -47,8 +45,6 @@ function test(keyfn, certfn, check, next) { // EADDRINUSE. var PORT = common.PORT + 5; - var connections = 0; - keyfn = join(common.fixturesDir, keyfn); var key = fs.readFileSync(keyfn).toString(); diff --git a/test/pummel/test-vm-memleak.js b/test/pummel/test-vm-memleak.js index f93f34127f9219..b2e48fd304516e 100644 --- a/test/pummel/test-vm-memleak.js +++ b/test/pummel/test-vm-memleak.js @@ -2,7 +2,6 @@ // Flags: --max_old_space_size=32 var assert = require('assert'); -var common = require('../common'); var start = Date.now(); var maxMem = 0; diff --git a/test/pummel/test-watch-file.js b/test/pummel/test-watch-file.js index 1d0ef77d543e43..b87711c7a17c45 100644 --- a/test/pummel/test-watch-file.js +++ b/test/pummel/test-watch-file.js @@ -6,7 +6,6 @@ var fs = require('fs'); var path = require('path'); var f = path.join(common.fixturesDir, 'x.txt'); -var f2 = path.join(common.fixturesDir, 'x2.txt'); console.log('watching for changes of ' + f); diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index 07b6ba4c341271..86be5f3835620b 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var util = require('util'); -var os = require('os'); var execSync = require('child_process').execSync; var execFileSync = require('child_process').execFileSync; diff --git a/test/sequential/test-debug-args.js b/test/sequential/test-debug-args.js index eb1533d4418a55..3532d885ff81a9 100644 --- a/test/sequential/test-debug-args.js +++ b/test/sequential/test-debug-args.js @@ -1,7 +1,6 @@ 'use strict'; // Flags: --debugger -var common = require('../common'); var assert = require('assert'); assert.notEqual(process.execArgv.indexOf('--debugger'), -1); diff --git a/test/sequential/test-deprecation-flags.js b/test/sequential/test-deprecation-flags.js index ca325654c55d80..cea2e2cdd30b06 100644 --- a/test/sequential/test-deprecation-flags.js +++ b/test/sequential/test-deprecation-flags.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var execFile = require('child_process').execFile; var depmod = require.resolve('../fixtures/deprecated.js'); diff --git a/test/sequential/test-mkdir-rmdir.js b/test/sequential/test-mkdir-rmdir.js index 976dbf6c2aa251..eb11d714829893 100644 --- a/test/sequential/test-mkdir-rmdir.js +++ b/test/sequential/test-mkdir-rmdir.js @@ -6,7 +6,6 @@ var fs = require('fs'); common.refreshTmpDir(); -var dirname = path.dirname(__filename); var d = path.join(common.tmpDir, 'dir'); var mkdir_error = false; diff --git a/test/sequential/test-net-GH-5504.js b/test/sequential/test-net-GH-5504.js index 0478de55d62592..d9bcea524d0f48 100644 --- a/test/sequential/test-net-GH-5504.js +++ b/test/sequential/test-net-GH-5504.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); // this test only fails with CentOS 6.3 using kernel version 2.6.32 // On other linuxes and darwin, the `read` call gets an ECONNRESET in diff --git a/test/sequential/test-net-listen-exclusive-random-ports.js b/test/sequential/test-net-listen-exclusive-random-ports.js index c32273a59b2a50..14271be2f471a0 100644 --- a/test/sequential/test-net-listen-exclusive-random-ports.js +++ b/test/sequential/test-net-listen-exclusive-random-ports.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var cluster = require('cluster'); var net = require('net'); diff --git a/test/sequential/test-pump-file2tcp.js b/test/sequential/test-pump-file2tcp.js index 86effb7c6c9a28..b0ef6193c7d01b 100644 --- a/test/sequential/test-pump-file2tcp.js +++ b/test/sequential/test-pump-file2tcp.js @@ -35,7 +35,6 @@ server.listen(common.PORT, function() { }); var buffer = ''; -var count = 0; server.on('listening', function() { }); diff --git a/test/sequential/test-regress-GH-1697.js b/test/sequential/test-regress-GH-1697.js index ff5754f357dfc1..2e6de41952ba1f 100644 --- a/test/sequential/test-regress-GH-1697.js +++ b/test/sequential/test-regress-GH-1697.js @@ -1,8 +1,7 @@ 'use strict'; var common = require('../common'); -var net = require('net'), - cp = require('child_process'), - util = require('util'); +var net = require('net'); +var cp = require('child_process'); if (process.argv[2] === 'server') { // Server diff --git a/test/sequential/test-regress-GH-1726.js b/test/sequential/test-regress-GH-1726.js index 859ab6cc5e4253..3c0953c9af7608 100644 --- a/test/sequential/test-regress-GH-1726.js +++ b/test/sequential/test-regress-GH-1726.js @@ -4,7 +4,6 @@ // exit when its child exits. // https://github.com/joyent/node/issues/1726 -var common = require('../common'); var assert = require('assert'); var ch = require('child_process'); diff --git a/test/sequential/test-regress-GH-819.js b/test/sequential/test-regress-GH-819.js index e459587d97cba9..6ba4be72cf289e 100644 --- a/test/sequential/test-regress-GH-819.js +++ b/test/sequential/test-regress-GH-819.js @@ -1,7 +1,5 @@ 'use strict'; -var common = require('../common'); var net = require('net'); -var assert = require('assert'); // Connect to something that we need to DNS resolve var c = net.createConnection(80, 'google.com'); diff --git a/test/sequential/test-repl-persistent-history.js b/test/sequential/test-repl-persistent-history.js index ef433912da5a65..08eb06c5e0ef8e 100644 --- a/test/sequential/test-repl-persistent-history.js +++ b/test/sequential/test-repl-persistent-history.js @@ -7,7 +7,6 @@ const stream = require('stream'); const REPL = require('internal/repl'); const assert = require('assert'); const fs = require('fs'); -const util = require('util'); const path = require('path'); const os = require('os'); diff --git a/test/sequential/test-setproctitle.js b/test/sequential/test-setproctitle.js index 11395f4fdbc52f..5168348b460a4b 100644 --- a/test/sequential/test-setproctitle.js +++ b/test/sequential/test-setproctitle.js @@ -7,7 +7,6 @@ if ('linux freebsd darwin'.indexOf(process.platform) === -1) { return; } -var common = require('../common'); var assert = require('assert'); var exec = require('child_process').exec; var path = require('path'); diff --git a/test/sequential/test-sigint-infinite-loop.js b/test/sequential/test-sigint-infinite-loop.js index 8211aeb69ec5db..a20b9bb8a74661 100644 --- a/test/sequential/test-sigint-infinite-loop.js +++ b/test/sequential/test-sigint-infinite-loop.js @@ -2,7 +2,6 @@ // This test is to assert that we can SIGINT a script which loops forever. // Ref(http): // groups.google.com/group/nodejs-dev/browse_thread/thread/e20f2f8df0296d3f -var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/sequential/test-stdin-child-proc.js b/test/sequential/test-stdin-child-proc.js index 93bf265b8b0020..923a4eb012dae6 100644 --- a/test/sequential/test-stdin-child-proc.js +++ b/test/sequential/test-stdin-child-proc.js @@ -1,7 +1,6 @@ 'use strict'; // This tests that pausing and resuming stdin does not hang and timeout // when done in a child process. See test/simple/test-stdin-pause-resume.js -var common = require('../common'); var child_process = require('child_process'); var path = require('path'); child_process.spawn(process.execPath, diff --git a/test/sequential/test-stdin-pipe-resume.js b/test/sequential/test-stdin-pipe-resume.js index dbac78d78c5e12..e159aaea0a60c3 100644 --- a/test/sequential/test-stdin-pipe-resume.js +++ b/test/sequential/test-stdin-pipe-resume.js @@ -1,6 +1,5 @@ 'use strict'; // This tests that piping stdin will cause it to resume() as well. -var common = require('../common'); var assert = require('assert'); if (process.argv[2] === 'child') { diff --git a/test/sequential/test-stdin-script-child.js b/test/sequential/test-stdin-script-child.js index 8590df02d8efe9..03ad46b095ab01 100644 --- a/test/sequential/test-stdin-script-child.js +++ b/test/sequential/test-stdin-script-child.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js b/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js index c6f5aecd40e262..b64aa9b2ee1047 100644 --- a/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js +++ b/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); if (process.argv[2] === 'child') diff --git a/test/sequential/test-stdout-close-catch.js b/test/sequential/test-stdout-close-catch.js index f0ecf9a7c4b725..470fa9843cb9de 100644 --- a/test/sequential/test-stdout-close-catch.js +++ b/test/sequential/test-stdout-close-catch.js @@ -3,7 +3,6 @@ var common = require('../common'); var assert = require('assert'); var path = require('path'); var child_process = require('child_process'); -var fs = require('fs'); var testScript = path.join(common.fixturesDir, 'catch-stdout-error.js'); diff --git a/test/sequential/test-stdout-stderr-reading.js b/test/sequential/test-stdout-stderr-reading.js index 82fd51cedda1de..d3ad8cbb581109 100644 --- a/test/sequential/test-stdout-stderr-reading.js +++ b/test/sequential/test-stdout-stderr-reading.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); // verify that stdout is never read from. diff --git a/test/sequential/test-stream2-fs.js b/test/sequential/test-stream2-fs.js index 96ab97174b2478..e775dd7c0ab690 100644 --- a/test/sequential/test-stream2-fs.js +++ b/test/sequential/test-stream2-fs.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var R = require('_stream_readable'); var assert = require('assert'); var fs = require('fs'); @@ -41,7 +40,6 @@ var w = new TestWriter(); w.on('results', function(res) { console.error(res, w.length); assert.equal(w.length, size); - var l = 0; assert.deepEqual(res.map(function(c) { return c.length; }), expectLengths); diff --git a/test/sequential/test-stream2-stderr-sync.js b/test/sequential/test-stream2-stderr-sync.js index ccbdc55e4feaf9..b320c172958c82 100644 --- a/test/sequential/test-stream2-stderr-sync.js +++ b/test/sequential/test-stream2-stderr-sync.js @@ -1,12 +1,6 @@ 'use strict'; // Make sure that sync writes to stderr get processed before exiting. -var common = require('../common'); -var assert = require('assert'); -var util = require('util'); - -var errnoException = util._errnoException; - function parent() { var spawn = require('child_process').spawn; var assert = require('assert'); diff --git a/test/sequential/test-sync-fileread.js b/test/sequential/test-sync-fileread.js index 24a80d96c2601b..e94064f029870f 100644 --- a/test/sequential/test-sync-fileread.js +++ b/test/sequential/test-sync-fileread.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); var path = require('path'); var fs = require('fs'); diff --git a/test/sequential/test-tcp-wrap-listen.js b/test/sequential/test-tcp-wrap-listen.js index a2c07a7a9ce2a2..44254c3d3f39aa 100644 --- a/test/sequential/test-tcp-wrap-listen.js +++ b/test/sequential/test-tcp-wrap-listen.js @@ -12,7 +12,7 @@ assert.equal(0, r); server.listen(128); -var slice, sliceCount = 0, eofCount = 0; +var sliceCount = 0, eofCount = 0; var writeCount = 0; var recvCount = 0; diff --git a/test/sequential/test-util-debug.js b/test/sequential/test-util-debug.js index 834c21ec0e50b4..6c220a2b687df3 100644 --- a/test/sequential/test-util-debug.js +++ b/test/sequential/test-util-debug.js @@ -1,5 +1,4 @@ 'use strict'; -var common = require('../common'); var assert = require('assert'); if (process.argv[2] === 'child') diff --git a/test/timers/test-timers-reliability.js b/test/timers/test-timers-reliability.js index b4332468bc2ec3..8fcef52feb7cd4 100644 --- a/test/timers/test-timers-reliability.js +++ b/test/timers/test-timers-reliability.js @@ -1,8 +1,6 @@ 'use strict'; // FaketimeFlags: --exclude-monotonic -f '2014-07-21 09:00:00' -var common = require('../common'); - var Timer = process.binding('timer_wrap').Timer; var assert = require('assert'); @@ -44,7 +42,7 @@ monoTimer.ontimeout = function() { monoTimer.start(300, 0); -var timer = setTimeout(function() { +setTimeout(function() { timerFired = true; }, 200);