Restore the test

This commit is contained in:
horike37 2016-10-24 22:32:48 +09:00
parent bdc5170d43
commit 05b141ce68

View File

@ -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 = {};