change approach again
This commit is contained in:
19
node_modules/command-line-args/test/class-definitions.js
generated
vendored
Normal file
19
node_modules/command-line-args/test/class-definitions.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
'use strict'
|
||||
const TestRunner = require('test-runner')
|
||||
const a = require('assert')
|
||||
const Definitions = require('../lib/definitions')
|
||||
|
||||
const runner = new TestRunner()
|
||||
|
||||
runner.test('.get()', function () {
|
||||
const definitions = new Definitions()
|
||||
definitions.load([ { name: 'one', defaultValue: 'eins' } ])
|
||||
a.strictEqual(definitions.get('--one').name, 'one')
|
||||
})
|
||||
|
||||
runner.test('.validate()', function () {
|
||||
a.throws(function () {
|
||||
const definitions = new Definitions()
|
||||
definitions.load([ { name: 'one' }, { name: 'one' } ])
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user