cucumber_messages 34.2.1
cucumber_messages: ^34.2.1 copied to clipboard
JSON schema-based messages for Cucumber inter-process communication.
import 'package:cucumber_messages/cucumber_messages.dart';
Future<void> main() async {
final envelope = Envelope(
attachment: Attachment(
body: 'Hello, world!',
contentEncoding: AttachmentContentEncoding.identity,
mediaType: 'text/plain',
),
);
final lines = encodeNdjsonEnvelopes(Stream.value(envelope));
await for (final decoded in decodeNdjsonEnvelopes(lines)) {
print(decoded.attachment?.body);
}
}