mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Restore the test
This commit is contained in:
parent
bdc5170d43
commit
05b141ce68
@ -165,6 +165,17 @@ describe('Variables', () => {
|
||||
expect(newProperty).to.equal('your account number is 5');
|
||||
});
|
||||
|
||||
it('should populate non string variables', () => {
|
||||
const serverless = new Serverless();
|
||||
const valueToPopulate = 5;
|
||||
const matchedString = '${opt:number}';
|
||||
const property = '${opt:number}';
|
||||
|
||||
const newProperty = serverless.variables
|
||||
.populateVariable(property, matchedString, valueToPopulate);
|
||||
expect(newProperty).to.equal('5');
|
||||
});
|
||||
|
||||
it('should throw error if populating non string or non number variable as sub string', () => {
|
||||
const serverless = new Serverless();
|
||||
const valueToPopulate = {};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user