Skip to content

Commit

Permalink
test: repro #8
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Apr 25, 2017
1 parent 101c5f5 commit 9b4d6b2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/pre.test.js
Expand Up @@ -135,6 +135,27 @@ describe('execPre', function() {
});
});

it('async pres with clone()', function(done) {
var execed = false;

hooks.pre('cook', true, function(next, done) {
execed = true;
setTimeout(
function() {
done();
},
5);

next();
});

hooks.clone().execPre('cook', null, function(err) {
assert.ifError(err);
assert.ok(execed);
done();
});
});

it('returns correct error when async pre errors', function(done) {
var execed = {};

Expand Down

0 comments on commit 9b4d6b2

Please sign in to comment.