Replies: 2 comments 2 replies
-
|
Hi, could you please elaborate it a bit more? For example, unit test Rust code or Dart code, etc (e.g. dart - use mocktail/mockito/etc) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I want take a unit test for rust function. I need mock StreamSink mod tests {
use crate::frb_generated::StreamSink;
#[tokio::test]
async fn test_import_data() {
let home = std::env::var_os("HOME").unwrap().to_str().unwrap().to_string();
let progress_sink = StreamSink::new();
let path = format!("{home}/Downloads/data.zip");
super::import_data(progress_sink, path.as_str()).await.unwrap();
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i want to write a unittest for StreamSink, how can i mock the struct?
Beta Was this translation helpful? Give feedback.
All reactions