Skip to content
Closed
Changes from all commits
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
10 changes: 5 additions & 5 deletions test/parallel/test-domain-from-timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
// Simple tests of most basic domain functionality.

require('../common');
var assert = require('assert');
const assert = require('assert');

// timeouts call the callback directly from cc, so need to make sure the
// domain will be used regardless
setTimeout(function() {
var domain = require('domain');
var d = domain.create();
const domain = require('domain');
const d = domain.create();
d.run(function() {
process.nextTick(function() {
console.trace('in nexttick', process.domain === d);
assert.equal(process.domain, d);
assert.strictEqual(process.domain, d);
});
});
});
}, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this should be a timer for the purposes of this test, even though it is effectively a setImmediate().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should probably also be a duration of 1. Duration of 0 gets changed to 1 internally anyways.