Skip to content

Commit

Permalink
Add test for object clientContext
Browse files Browse the repository at this point in the history
  • Loading branch information
gpotter2 committed Sep 12, 2022
1 parent 2649ab9 commit 1b89cb1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,11 @@ describe("- Testing lambdalocal.js", function () {
});
});
describe("* Second run (with profile)", function () {
var done, err;
var done, err, clientContext;
before(function (cb) {
var lambdalocal = require(lambdalocal_path);
lambdalocal.setLogger(winston);
clientContext = { "cc2": "yyy" };
lambdalocal.execute({
event: require(path.join(__dirname, "./events/test-event.js")),
lambdaPath: path.join(__dirname, "./functs/test-func.js"),
Expand All @@ -206,7 +207,13 @@ describe("- Testing lambdalocal.js", function () {
},
envdestroy: true,
envfile: path.join(__dirname, "./other/env"),
verboseLevel: 1
verboseLevel: 1,
clientContext: clientContext,
});
});
describe("# Context object", function () {
it("should also contain clientContext", function () {
assert.deepEqual(done.context.clientContext, clientContext);
});
});
describe("# Environment Variables (destroy)", function () {
Expand Down

0 comments on commit 1b89cb1

Please sign in to comment.