Socket
Book a DemoInstallSign in
Socket

yargs-test-extends

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yargs-test-extends

test yargs' extends functionality

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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"
}

FAQs

Package last updated on 01 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts