Spaces:
Sleeping
Sleeping
File size: 644 Bytes
be5030f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
'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'
})
})
|