yargs-test-extends

1.0.1 • Public • Published

yargs-test-extends

Used in the following unit test:

it('allows a module to be extended, rather than a JSON file', () => {
  var argv = yargs()
    .config({
      a: 2,
      extends: 'yargs-test-extends'
    })
    .argv
 
  argv.a.should.equal(2)
  argv.c.should.equal(201)
})

To make sure that yargs can extend configuration from a module.

index.json

{
  "c": 201
}

package.json

{
  "name": "yargs-test-extends",
  "version": "1.0.0",
  "description": "test yargs' extends functionality",
  "main": "index.json",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Ben Coe <ben@npmjs.com>",
  "license": "ISC"
}

Readme

Keywords

none

Package Sidebar

Install

npm i yargs-test-extends

Weekly Downloads

111

Version

1.0.1

License

ISC

Last publish

Collaborators

  • bcoe