mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
27 lines
709 B
JavaScript
27 lines
709 B
JavaScript
'use strict'
|
|
|
|
const { expect } = require('chai')
|
|
const renderOptionsHelp = require('../../../../../lib/cli/render-help/options')
|
|
const observeOutput = require('@serverless/test/observe-output')
|
|
|
|
describe('test/unit/lib/cli/render-help/options.test.js', () => {
|
|
it('should list options', async () => {
|
|
const output = await observeOutput(() =>
|
|
renderOptionsHelp({
|
|
foo: {
|
|
usage: 'Some option',
|
|
shortcut: 'b',
|
|
required: true,
|
|
},
|
|
bar: {
|
|
usage: 'Elo',
|
|
},
|
|
noData: {},
|
|
}),
|
|
)
|
|
expect(output).to.have.string('--foo')
|
|
expect(output).to.have.string('-b')
|
|
expect(output).to.have.string('Some option')
|
|
})
|
|
})
|