Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: using common.isWindows consistently #2269

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixing one off case
  • Loading branch information
thefourtheye committed Jul 30, 2015
commit 55a7131cee1dcd93f8bb2a0bf1ffab5e536135e6
8 changes: 3 additions & 5 deletions test/parallel/test-dgram-exclusive-implicit-bind.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ var dgram = require('dgram');
// supported while using cluster, though servers still cause the master to error
// with ENOTSUP.

var windows = common.isWindows;

if (cluster.isMaster) {
var pass;
var messages = 0;
Expand All @@ -56,12 +54,12 @@ if (cluster.isMaster) {
messages++;
ports[rinfo.port] = true;

if (windows && messages === 2) {
if (common.isWindows && messages === 2) {
assert.equal(Object.keys(ports).length, 2);
done();
}

if (!windows && messages === 4) {
if (!common.isWindows && messages === 4) {
assert.equal(Object.keys(ports).length, 3);
done();
}
Expand All @@ -76,7 +74,7 @@ if (cluster.isMaster) {
target.on('listening', function() {
cluster.fork();
cluster.fork();
if (!windows) {
if (!common.isWindows) {
cluster.fork({BOUND: 'y'});
cluster.fork({BOUND: 'y'});
}
Expand Down