Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected async function to be a function #103

Closed
sidwood opened this issue Jul 14, 2017 · 3 comments
Assignees
Labels
bug
Milestone

Comments

@sidwood
Copy link

@sidwood sidwood commented Jul 14, 2017

I expected the following to pass

expect(async function () {}).to.be.a.function()

but I get

Error: Expected [AsyncFunction] to be a function but got 'object'

I'm using code 4.1.0.

The typeof operator returns 'function' for async functions so this looks like an issue but honestly, I'd be surprised if this was missed wich makes me second guess. Maybe I just need to adjust my expectations.

@cjihrig cjihrig self-assigned this Jul 14, 2017
@cjihrig cjihrig added the bug label Jul 14, 2017
@cjihrig cjihrig added this to the 4.1.1 milestone Jul 14, 2017
@cjihrig

This comment has been minimized.

Copy link
Contributor

@cjihrig cjihrig commented Jul 14, 2017

Fixed in cf692d0.

@cjihrig cjihrig closed this Jul 14, 2017
@cjihrig

This comment has been minimized.

Copy link
Contributor

@cjihrig cjihrig commented Sep 26, 2017

Try it with Code v5 on Node 8.

@tutukin

This comment has been minimized.

Copy link

@tutukin tutukin commented Sep 26, 2017

Ok, now I've got it: lab 14.3.1 uses code 4 internally and does not notice code 5 is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.