summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-async-hooks-promise-enable-disable.js3
-rw-r--r--test/parallel/test-async-hooks-promise.js4
-rw-r--r--test/parallel/test-domain-promise.js6
3 files changed, 2 insertions, 11 deletions
diff --git a/test/parallel/test-async-hooks-promise-enable-disable.js b/test/parallel/test-async-hooks-promise-enable-disable.js
index 150ccc88b0..47a259166e 100644
--- a/test/parallel/test-async-hooks-promise-enable-disable.js
+++ b/test/parallel/test-async-hooks-promise-enable-disable.js
@@ -4,7 +4,6 @@ const common = require('../common');
const assert = require('assert');
const async_hooks = require('async_hooks');
const EXPECTED_INITS = 2;
-let p_resource = null;
let p_er = null;
let p_inits = 0;
@@ -23,7 +22,6 @@ const mustCallInit = common.mustCall(function init(id, type, tid, resource) {
if (type !== 'PROMISE')
return;
p_inits++;
- p_resource = resource.promise;
}, EXPECTED_INITS);
const hook = async_hooks.createHook({
@@ -36,7 +34,6 @@ new Promise(common.mustCall((res) => {
})).then(common.mustCall((val) => {
hook.enable().enable();
const p = new Promise((res) => res(val));
- assert.strictEqual(p, p_resource);
hook.disable();
return p;
})).then(common.mustCall((val2) => {
diff --git a/test/parallel/test-async-hooks-promise.js b/test/parallel/test-async-hooks-promise.js
index be1509c7fc..637d287b50 100644
--- a/test/parallel/test-async-hooks-promise.js
+++ b/test/parallel/test-async-hooks-promise.js
@@ -21,11 +21,9 @@ async_hooks.createHook({
}).enable();
const a = Promise.resolve(42);
-const b = a.then(common.mustCall());
+a.then(common.mustCall());
assert.strictEqual(initCalls[0].triggerId, 1);
assert.strictEqual(initCalls[0].resource.isChainedPromise, false);
-assert.strictEqual(initCalls[0].resource.promise, a);
assert.strictEqual(initCalls[1].triggerId, initCalls[0].id);
assert.strictEqual(initCalls[1].resource.isChainedPromise, true);
-assert.strictEqual(initCalls[1].resource.promise, b);
diff --git a/test/parallel/test-domain-promise.js b/test/parallel/test-domain-promise.js
index 1c6e629560..7040925223 100644
--- a/test/parallel/test-domain-promise.js
+++ b/test/parallel/test-domain-promise.js
@@ -50,7 +50,6 @@ const vm = require('vm');
d2.run(common.mustCall(() => {
p.then(common.mustCall((v) => {
assert.strictEqual(process.domain, d2);
- assert.strictEqual(p.domain, d1);
}));
}));
}
@@ -64,9 +63,8 @@ const vm = require('vm');
}));
d2.run(common.mustCall(() => {
- p.then(p.domain.bind(common.mustCall((v) => {
+ p.then(d1.bind(common.mustCall((v) => {
assert.strictEqual(process.domain, d1);
- assert.strictEqual(p.domain, d1);
})));
}));
}
@@ -83,7 +81,6 @@ const vm = require('vm');
d2.run(common.mustCall(() => {
p.then(common.mustCall((v) => {
assert.strictEqual(process.domain, d2);
- assert.strictEqual(p.domain, d1);
}));
}));
}));
@@ -100,7 +97,6 @@ const vm = require('vm');
d2.run(common.mustCall(() => {
p.catch(common.mustCall((v) => {
assert.strictEqual(process.domain, d2);
- assert.strictEqual(p.domain, d1);
}));
}));
}