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.

dotted.js 441B

12345678910111213141516
  1. var parse = require('../');
  2. var test = require('tape');
  3. test('dotted alias', function (t) {
  4. var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
  5. t.equal(argv.a.b, 22);
  6. t.equal(argv.aa.bb, 22);
  7. t.end();
  8. });
  9. test('dotted default', function (t) {
  10. var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
  11. t.equal(argv.a.b, 11);
  12. t.equal(argv.aa.bb, 11);
  13. t.end();
  14. });