Skip to content

Commit bb37cc5

Browse files
committedSep 16, 2017
add test to identify async functions
Closes #104
1 parent 41b4106 commit bb37cc5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
 

‎test/index.js

+14
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,20 @@ describe('expect()', () => {
734734
Hoek.assert(exception.message === 'Expected false to be a function but got \'boolean\'', exception);
735735
done();
736736
});
737+
738+
it('identifies async functions', (done) => {
739+
740+
let exception = false;
741+
try {
742+
Code.expect(async () => {}).to.be.a.function();
743+
}
744+
catch (err) {
745+
exception = err;
746+
}
747+
748+
Hoek.assert(!exception, exception);
749+
done();
750+
});
737751
});
738752

739753
describe('number()', () => {

0 commit comments

Comments
 (0)
Please sign in to comment.