test('passing no values yields default value when defined', () {
var optionValue;
return new FunctionScript(({@Option(allowMultiple: true, defaultsTo: 'x') option}) {
optionValue = option;
}).execute([]).then((_) {
expect(optionValue, ['x']);
});
});
test('passing no values yields empty List when default value is null', () {
var optionValue;
return new FunctionScript(({@Option(allowMultiple: true) option}) {
optionValue = option;
}).execute([]).then((_) {
expect(optionValue, []);
});
});
Both of the above tests currently, because the option is just assigned it's default value (even when it's null).