MCPcopy Index your code
hub / github.com/nodejs/node / test

Function test

test/parallel/test-crypto-domain.js:31–41  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

29const domain = require('domain');
30
31function test(fn) {
32 const ex = new Error('BAM');
33 const d = domain.create();
34 d.on('error', common.mustCall(function(err) {
35 assert.strictEqual(err, ex);
36 }));
37 const cb = common.mustCall(function() {
38 throw ex;
39 });
40 d.run(fn, cb);
41};
42
43test(function(cb) {
44 crypto.pbkdf2('password', 'salt', 1, 8, 'sha1', cb);

Callers 1

Calls 3

createMethod · 0.45
onMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…