import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:lumen/ui/licenses.dart'; void main() { test('each component keeps distinct notices without duplicates', () async { final notices = await collectLicenseNotices( Stream.fromIterable([ LicenseEntryWithLineBreaks(['First', 'Second'], 'Shared notice'), LicenseEntryWithLineBreaks(['First'], 'Shared notice'), LicenseEntryWithLineBreaks(['First'], 'Different notice'), ]), ); expect(notices.length, 2); expect(notices['First'], {'Shared notice', 'Different notice'}); expect(notices['Second'], {'Shared notice'}); }); }