Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing no values to an allowMultiple Option does not wrap value in List #110

Open
seaneagan opened this issue Jun 24, 2015 · 0 comments
Open

Comments

@seaneagan
Copy link
Owner

      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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant