Skip to content

Commit

Permalink
test: cleanup/update test-dgram-empty-packet.js
Browse files Browse the repository at this point in the history
 * 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 Fishrock123 committed Oct 11, 2016
1 parent e7039cd commit 5164865
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/parallel/test-dgram-empty-packet.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 5164865

Please sign in to comment.