-
Notifications
You must be signed in to change notification settings - Fork 201
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
Jasmine matcher couldn't be called from after() #307
Comments
you dont need to match the status code in the after function there is a helper to make that easier:
however if you want to use in your way you need add a ; in the end of your expect to make it work
|
Thanks @ctadeu to mention tailing semicolon. JavaScript is not my mother tongue... Anyway, I still have a same error with semicolon. I will be happy if I could use expectStatus(), but my target API return several status codes randomly (basically "200", but in some case returns "20x"), and I thought I need to use "expect() inside "after()." |
I made the same example here and it works. How are you running your spec? |
Hmm, it seems as an environmental issue I guess, but I couldn't expect the reason why.
And I run the script named sample_spec.js by launching jasmine-node command:
Any comment? |
Finally I found my mistake,
the code above, Sorry for annoyance, and now I have a code which works well as I expected. |
With running a following test code,
I got:
I thought I made some mistake... Could you point me out?
The text was updated successfully, but these errors were encountered: