-
Notifications
You must be signed in to change notification settings - Fork 61
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
Error when using finish(fail)
on master
#99
Comments
After further investigation, it seems that this issue is the problem. So in order to fix the problem, we can either create a global function fail as follow: function fail(reason = "fail was called in a test.") {
throw new Error(reason);
}
global.fail = fail; Or in order to stay in ReScript world, we can simply use this: test("fail", () => Js.Exn.raiseError("A description in order to understand the test failure")) This way, jest displays his nice messages output 😄 |
Thanks for the report. And the research! If you don't mind I'd like to keep this open until they've fixed this upstream as we have to update the dependency here as well. Also, another workaround from that issue:
|
Of course 😄 glad to help !! |
Hello, first of all, thx for your amazing work 👌🏾
I got some problem when testing async code as follow:
which translates in following JS:
Errors with:
Here you can find my bsconfig.json:
And my package.json:
As you can see, i use the master version of your package since npm can't find any 0.8 version on npm.org
And i also use
open GlennslRescriptJest.Jest
since Rescript cannot findJest
namespace.My environnement is:
OS: Elementary OS 6 Odin (Ubuntu 20.04.3 LTS)
Node: v16.13.0 (with flag
--experimental-vm-modules
in order to use ESM module without babel)Yarn: 1.22.17
Im available if you need more information about this issue 😉
The text was updated successfully, but these errors were encountered: