Permalink
Browse files

test: cleanup/update test-dgram-empty-packet.js

 * Changed some `var` to `const` and 'let'
 * Changed `==` to `===` for clarity.

PR-URL: #8896
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information...
Goyapa authored and imyller committed Oct 1, 2016
1 parent 3723806 commit f68e0d1864b11b15014334dc44e4a11692667573
Showing with 7 additions and 7 deletions.
  1. +7 −7 test/parallel/test-dgram-empty-packet.js
@@ -1,22 +1,22 @@
'use strict';
var common = require('../common');
const common = require('../common');
const dgram = require('dgram');
var dgram = require('dgram');
var callbacks = 0;
var client;
var timer;
let callbacks = 0;
let timer;
if (common.isOSX) {
common.skip('because of 17894467 Apple bug');
return;
}
client = dgram.createSocket('udp4');
const client = dgram.createSocket('udp4');
client.bind(0, function() {
function callback() {
callbacks++;
if (callbacks == 2) {
if (callbacks === 2) {
clearTimeout(timer);
client.close();
} else if (callbacks > 2) {

0 comments on commit f68e0d1

Please sign in to comment.