summaryrefslogtreecommitdiff
path: root/test/parallel/test-domain-implicit-fs.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-01-19 10:35:39 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-01-24 13:16:07 +0100
commit72bb4445c64af98f3e481c11320afbfb995f010c (patch)
tree282d7240fb99f92a2332a74b6044f04317b5b78a /test/parallel/test-domain-implicit-fs.js
parent7a23fc076045e767b922343c226d8492cc98cb93 (diff)
downloadandroid-node-v8-72bb4445c64af98f3e481c11320afbfb995f010c.tar.gz
android-node-v8-72bb4445c64af98f3e481c11320afbfb995f010c.tar.bz2
android-node-v8-72bb4445c64af98f3e481c11320afbfb995f010c.zip
assert: wrap original error in ifError
It is hard to know where ifError is actually triggered due to the original error being thrown. This changes it by wrapping the original error in a AssertionError. This has the positive effect of also making clear that it is indeed a assertion function that triggered that error. The original stack can still be accessed by checking the `actual` property. PR-URL: https://github.com/nodejs/node/pull/18247 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-domain-implicit-fs.js')
-rw-r--r--test/parallel/test-domain-implicit-fs.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-domain-implicit-fs.js b/test/parallel/test-domain-implicit-fs.js
index 6e4127763c..f369598950 100644
--- a/test/parallel/test-domain-implicit-fs.js
+++ b/test/parallel/test-domain-implicit-fs.js
@@ -34,9 +34,9 @@ d.on('error', common.mustCall(function(er) {
assert.strictEqual(er.domain, d);
assert.strictEqual(er.domainThrown, true);
assert.ok(!er.domainEmitter);
- assert.strictEqual(er.code, 'ENOENT');
- assert.ok(/\bthis file does not exist\b/i.test(er.path));
- assert.strictEqual(typeof er.errno, 'number');
+ assert.strictEqual(er.actual.code, 'ENOENT');
+ assert.ok(/\bthis file does not exist\b/i.test(er.actual.path));
+ assert.strictEqual(typeof er.actual.errno, 'number');
}));