Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default_bool.js 454B

1234567891011121314151617181920
  1. var test = require('tape');
  2. var parse = require('../');
  3. test('boolean default true', function (t) {
  4. var argv = parse([], {
  5. boolean: 'sometrue',
  6. default: { sometrue: true }
  7. });
  8. t.equal(argv.sometrue, true);
  9. t.end();
  10. });
  11. test('boolean default false', function (t) {
  12. var argv = parse([], {
  13. boolean: 'somefalse',
  14. default: { somefalse: false }
  15. });
  16. t.equal(argv.somefalse, false);
  17. t.end();
  18. });