cucumber_expressions 20.1.0
cucumber_expressions: ^20.1.0 copied to clipboard
Cucumber Expressions for Dart. A simpler alternative to Regular Expressions with a more intuitive syntax, plus parameter type matching and expression generation.
import 'dart:io';
import 'package:cucumber_expressions/cucumber_expressions.dart';
void main() {
final expression = ExpressionFactory(
ParameterTypeRegistry(),
).createExpression('I have {int} cukes');
final arguments = expression.match('I have 24 cukes');
stdout.writeln('I have ${arguments?.first.getValue()} cukes.');
}