mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
18 lines
642 B
JavaScript
18 lines
642 B
JavaScript
'use strict';
|
|
|
|
const { expect } = require('chai');
|
|
const resolveCliInput = require('./resolveCliInput');
|
|
|
|
describe('#resolveCliInput', () => {
|
|
it('Should crash on multiple config paths', () => {
|
|
expect(() => resolveCliInput('--config world --config hello')).to.throw(
|
|
/Expected single value/
|
|
);
|
|
expect(() => resolveCliInput('--config world --c hello')).to.throw(/Expected single value/);
|
|
expect(() => resolveCliInput('--c world --c hello')).to.throw(/Expected single value/);
|
|
});
|
|
it('Should resole singular config', () => {
|
|
expect(resolveCliInput('--config world').options.config).to.equal('world');
|
|
});
|
|
});
|