diff --git a/lib/main.js b/lib/main.js index 1e1eae9e..529e7f35 100644 --- a/lib/main.js +++ b/lib/main.js @@ -153,7 +153,10 @@ Lambda.prototype._eventSourceList = function (program) { if (Object.prototype.toString.call(list) === '[object Array]') { // backward-compatible - return { EventSourceMappings: list }; + return { + EventSourceMappings: list, + ScheduleEvents: [] + }; } if (!list.EventSourceMappings) { list.EventSourceMappings = []; diff --git a/test/main.js b/test/main.js index f037b8a0..659e3105 100644 --- a/test/main.js +++ b/test/main.js @@ -593,7 +593,10 @@ describe('node-lambda', function () { it('program.eventSourceFile is valid value', function () { program.eventSourceFile = fileName; - const expected = { EventSourceMappings: oldStyleValue }; + const expected = { + EventSourceMappings: oldStyleValue, + ScheduleEvents: [] + }; assert.deepEqual(lambda._eventSourceList(program), expected); }); });