-
Notifications
You must be signed in to change notification settings - Fork 34
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
Expect().toThrowErrorAsync() not executing function and passing silently. #458
Comments
I am using the async Expect the following way, and it works flawlessly. @AsyncTest('Test name')
public async originalDoesNotExist() {
await Expect(() => asyncMethod()).toThrowErrorAsync(Error, 'Original does not exist');
} |
Hey @jhm-ciberman did @pohy 's suggestion work for you? |
Sorry, I didn't touch my computer the last month due to personal problems.
I will try it later.
Maybe you can document that feature. I wasn't aware of how that function
should be used. Thanks!
El vie., 20 de abr. de 2018 10:24 PM, James Adarich <
[email protected]> escribió:
… Hey @jhm-ciberman <https://github.com/jhm-ciberman> did @pohy
<https://github.com/pohy> 's suggestion work for you? toThrowErrorAsync
is an async function and must be awaited. I think we could potentially
add a safeguard here in future when we handle stuff like multiple failures
but we'd need some rework to do so.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#458 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHnkf6ufumAIGgsmn2xaOfUZ7aDuAiDJks5tqopcgaJpZM4Ssyf1>
.
|
@jhm-ciberman sorry to hear that hope all is well. Yes great point we will add some documentation around that :) |
Updated https://github.com/alsatian-test/alsatian/wiki/Matchers :) all good? |
Hey @jamesadarich, Seeing as asynchronous JavaScript is on the rise, I think it might be a good idea to handle these problems by waiting for the promise ourselves. Proof Of Concept:
Output:
|
Yep agree this should be handled as discussed in #455 👍 |
Hi!
This code works perfectly.
tl.loadFrom()
This code does not work:
tl.loadFrom(dir)
is NOT executed acording to the coverageThis code also does not work:
tl.loadFrom(dir)
is NOT executed acording to the coverageThe text was updated successfully, but these errors were encountered: