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 · 4 comments
Closed

Expected async function to be a function #103

sidwood opened this issue Jul 14, 2017 · 4 comments
Assignees
Labels
bug Bug or defect
Milestone

Comments

@sidwood
Copy link

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 Bug or defect label Jul 14, 2017
@cjihrig cjihrig added this to the 4.1.1 milestone Jul 14, 2017
@cjihrig
Copy link
Contributor

cjihrig commented Jul 14, 2017

Fixed in cf692d0.

@cjihrig cjihrig closed this as completed Jul 14, 2017
@cjihrig
Copy link
Contributor

cjihrig commented Sep 26, 2017

Try it with Code v5 on Node 8.

@tutukin
Copy link

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.

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

No branches or pull requests

3 participants