-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
toBeInstanceOf( Function ) not working as expected. #5946
Comments
I can make a repro if needed, but first let me know if I'm expecting something I shouldn't be expecting (no pun intended! 😊 ). |
How is |
comment deleted (I made a mistake in this comment, but not in the original post) |
@SimenB let o = {
method() { ... }
} then eventually expect( o.method ).toBeInstanceOf( Function ) |
Okay, nevermind, I didn't make a mistake in my second comment. I've got code like this that I can make my test pass with: // strange!
expect( typeof result ).toBe( 'object' )
expect( result ).not.toBeInstanceOf( Object )
expect( result.constructor.name ).toBe( 'Object' )
expect( result.constructor ).not.toBe( Object )
|
Might be #2549? |
Yep, seems like it might be the same thing. |
Closing as dupe, then. Follow that for updates (hope to have it solved for jest 23) |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Jest 22.4.3
I've got this test, that works:
but then this fails:
with output:
Seems like it should not fail.
The text was updated successfully, but these errors were encountered: