(fn)
| 29 | const domain = require('domain'); |
| 30 | |
| 31 | function 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 | |
| 43 | test(function(cb) { |
| 44 | crypto.pbkdf2('password', 'salt', 1, 8, 'sha1', cb); |
no test coverage detected
searching dependent graphs…