Sha256: bbcc699b6392b0d7921600f64f6d37b80c17f8c76d539a7968c38a7a6a883e38

Contents?: true

Size: 441 Bytes

Versions: 342

Compression:

Stored size: 441 Bytes

Contents

var parse = require('../');
var test = require('tape');

test('dotted alias', function (t) {
    var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
    t.equal(argv.a.b, 22);
    t.equal(argv.aa.bb, 22);
    t.end();
});

test('dotted default', function (t) {
    var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
    t.equal(argv.a.b, 11);
    t.equal(argv.aa.bb, 11);
    t.end();
});

Version data entries

342 entries across 273 versions & 33 rubygems

Version Path
govuk_publishing_components-17.16.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.15.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.14.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.13.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.12.2 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.12.1 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.12.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.11.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.10.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.9.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.8.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.7.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.6.1 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.6.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.5.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.4.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.3.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.2.0 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.1.1 node_modules/minimist/test/dotted.js
govuk_publishing_components-17.1.0 node_modules/minimist/test/dotted.js