lambda-local
Advanced tools
Comparing version 1.2.0 to 1.3.0
# ChangeLog | ||
## 1.3.0 (2016/11/26) | ||
* Fixed critical bug (logger) | ||
## 1.2.0 (2016/11/23) | ||
@@ -4,0 +7,0 @@ * Added mock functionality |
@@ -19,6 +19,10 @@ 'use strict'; | ||
} else { | ||
throw new TypeError("The object must be a winston logger !"); | ||
console.warn("Invalid logger object ! Using default logger"); | ||
} | ||
} | ||
var _getLogger = function() { | ||
return logger; | ||
} | ||
var _execute = function(opts) { | ||
@@ -92,3 +96,4 @@ var event = opts.event, | ||
execute: _execute, | ||
setLogger: _setLogger | ||
setLogger: _setLogger, | ||
getLogger: _getLogger | ||
}; |
{ | ||
"name": "lambda-local", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Commandline tool to run Lambda functions on your local machine.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -75,9 +75,9 @@ ## Samples for API | ||
}); | ||
describe("Your first test", function () { | ||
it("should return mocked value", function () { | ||
assert.equal(done, "MockedData"); | ||
}); | ||
}); | ||
describe("Your first test", function () { | ||
it("should return mocked value", function () { | ||
assert.equal(done, "MockedData"); | ||
}); | ||
... Other tests | ||
}); | ||
... Other tests | ||
``` | ||
@@ -84,0 +84,0 @@ |
@@ -31,2 +31,28 @@ "use strict"; | ||
}); | ||
describe("- Testing lambdalocal.js Logger", function () { | ||
var lambdalocal = require("../lib/lambdalocal.js"); | ||
var defaultLogger = lambdalocal.getLogger(); | ||
describe("* Use winston logger", function () { | ||
it("should correctly load Logger", function () { | ||
lambdalocal.setLogger(winston); | ||
var logger = lambdalocal.getLogger(); | ||
assert.equal(winston, logger); | ||
}); | ||
}); | ||
describe("* Use invalid logger (object)", function () { | ||
it("should load default Logger", function () { | ||
lambdalocal.setLogger(Object); | ||
var logger = lambdalocal.getLogger(); | ||
assert.equal(logger, defaultLogger); | ||
}); | ||
}); | ||
describe("* Use null logger", function () { | ||
it("should load default Logger", function () { | ||
lambdalocal.setLogger(null); | ||
var logger = lambdalocal.getLogger(); | ||
assert.equal(logger, defaultLogger); | ||
}); | ||
}); | ||
}); | ||
describe("- Testing lambdalocal.js", function () { | ||
@@ -131,2 +157,2 @@ describe("* Basic Run", function () { | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33831
610