Files
fil/docs/snippets/dart/plugins/plugin_testing.md
Henrik Jess Nielsen b4c07d3693
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s
Nomad changes
2026-06-01 23:40:55 +02:00

857 B

import 'package:kreuzberg/kreuzberg.dart';

Future<void> main() async {
  // Plugin testing with Dart is different from Rust. Dart plugins cannot be
  // unit-tested in isolation because the registration mechanism uses closures
  // captured in the plugin factory, and test framework async contexts vary.
  //
  // Recommended approaches:
  // 1. Test core plugin logic directly in unit tests with mock data
  // 2. Write integration tests that register the plugin and exercise it via
  //    KreuzbergBridge.extractFile or other extraction methods
  // 3. For complex plugins, implement in Rust and test with #[tokio::test]
}