Open ospfranco opened 2 months ago
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.
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();
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