-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[bug] assert_ipc_response (Rust tests for icp commands) are broken on 1.6.7 #9960
Comments
We fixed this issue on v2 but didn't apply the same fix for v1, and it wasn't catch by CI because we applied this patch on a GitHub private fork from an advisory, which doesn't run CI tests by default. A fix will be deployed today. |
fix available on 1.6.8, you now must add |
Thank you! |
Also, what about docs, is this the correct way to write tests for the JS commands? |
The way issues are closed and then never looked at again is frustrating. In any case, somebody stumbles upon this issue I've done a small write-up on how to write tests for JS commands: https://ospfranco.com/writting-tests-for-tauri-rust-commands/ |
Hi, I'm trying to write tests for some of the Rust commands that are made available to JS. I was using the function provided by
tauri::test::assert_ipc_response
according to this SO answer:However, it seems there has been a recent update to the Tauri runtime where an
invoke_key
is now required. So now thetauri::InvokePayload
now requires it and it fails if a matching value to the internal key is not provided:How is one supposed to write tests for the exposed Rust code? There is no documentation on how to achieve this.
Edit: This PR added reference to invoke_key everywhere, but there is no way to retrieve it in a test context.
The text was updated successfully, but these errors were encountered: