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
docs improvements for test module #2094
Labels
enhancement
Does it add or improve content?
Milestone
Comments
I just stumbled upon mock_app(): let app = tauri::test::mock_app(); That seems to work. Would be great to have this documented better. |
Moved this to the docs repo because i think the whole testing guide needs improvements, however this also needs to be fixed in the rust code docs so it's really an issue in both repos. |
FabianLars
changed the title
[bug] cannot create more than one mock app?
docs improvements for test module
Apr 30, 2024
In order to create an app with the JS bindings I needed to test I had to do it this way, not sure if it is the correct way but it works for me: let app = tauri::test::mock_builder()
.plugin(super::init())
.build(mock_context(noop_assets()))
.unwrap(); |
simonhyll
added
enhancement
Does it add or improve content?
and removed
bug
Does it fix inaccurate content or fix a bug?
labels
May 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I'm trying to write some tests for the Rust backend. In those tests I'm trying to create instances of a mock api so I can tests the bindings to JS are properly setup:
However, whenever I try to run my tests I get the following error:
There is not a lot of documentation on how to achieve this but I can assume that creating multiple instances of a tauri app is not supported?
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: