change approach again

This commit is contained in:
2018-05-09 14:31:22 +02:00
parent 54a933c83a
commit 0686e02b75
2252 changed files with 864743 additions and 270 deletions

View 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' } ])
})
})