summaryrefslogtreecommitdiff
path: root/test/parallel/test-crypto-domains.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-crypto-domains.js')
-rw-r--r--test/parallel/test-crypto-domains.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/parallel/test-crypto-domains.js b/test/parallel/test-crypto-domains.js
index 23ca991500..be87cad6ff 100644
--- a/test/parallel/test-crypto-domains.js
+++ b/test/parallel/test-crypto-domains.js
@@ -21,17 +21,16 @@
'use strict';
const common = require('../common');
+if (!common.hasCrypto)
+ common.skip('missing crypto');
+
const domain = require('domain');
const assert = require('assert');
+const crypto = require('crypto');
+
const d = domain.create();
const expect = ['pbkdf2', 'randomBytes', 'pseudoRandomBytes'];
-if (!common.hasCrypto) {
- common.skip('missing crypto');
- return;
-}
-const crypto = require('crypto');
-
d.on('error', common.mustCall(function(e) {
assert.strictEqual(e.message, expect.shift());
}, 3));