mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
test that flutter_rust_bridge works
This commit is contained in:
1 parent
59968e0d6c
commit
5da8846a42
196 files changed
+11344
-9
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter_app/main.dart';
|
||||
import 'package:flutter_app/src/rust/frb_generated.dart';
|
||||
import 'package:integration_test/integration_test.dart';
|
||||
|
||||
void main() {
|
||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||
setUpAll(() async => await RustLib.init());
|
||||
testWidgets('Can call rust function', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const MyApp());
|
||||
expect(find.textContaining('Result: `Hello, Tom!`'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user