This commit is contained in:
2018-05-16 10:10:23 +02:00
commit 79abc63edd
597 changed files with 93351 additions and 0 deletions

View File

@ -0,0 +1,26 @@
'use strict'
const TestRunner = require('test-runner')
const a = require('assert')
const Output = require('../../lib/output')
const runner = new TestRunner()
runner.test('output.toObject(): no defs set', function () {
const output = new Output([
{ name: 'one' }
])
a.deepStrictEqual(output.toObject(), {})
})
runner.test('output.toObject(): one def set', function () {
const output = new Output([
{ name: 'one' }
])
const Option = require('../../lib/option')
const option = Option.create({ name: 'one' })
option.set('yeah')
output.set('one', option)
a.deepStrictEqual(output.toObject(), {
one: 'yeah'
})
})