Skip to content

Commit

Permalink
add test to identify async functions
Browse files Browse the repository at this point in the history
Closes #104
  • Loading branch information
cjihrig committed Sep 16, 2017
1 parent 41b4106 commit bb37cc5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/index.js
Expand Up @@ -734,6 +734,20 @@ describe('expect()', () => {
Hoek.assert(exception.message === 'Expected false to be a function but got \'boolean\'', exception);
done();
});

it('identifies async functions', (done) => {

let exception = false;
try {
Code.expect(async () => {}).to.be.a.function();
}
catch (err) {
exception = err;
}

Hoek.assert(!exception, exception);
done();
});
});

describe('number()', () => {
Expand Down

0 comments on commit bb37cc5

Please sign in to comment.