Skip to content

Commit

Permalink
Added test for finalize.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogelio-o committed Dec 26, 2017
1 parent 55a7439 commit 57b8318
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lambda-framework-aws",
"version": "1.0.6",
"version": "1.0.7",
"description": "AWS Lambda implementation of Lambda Framework",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down Expand Up @@ -53,4 +53,4 @@
"**/*.spec.js"
]
}
}
}
12 changes: 12 additions & 0 deletions test/AWSRawCallback.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,16 @@ describe("AWSRawCallback", () => {

});

describe("#finalize", () => {

it("calls the original `callback` function with the given error.", () => {
const err: Error = new Error("Test.");

rawCallback.finalize(err);

Chai.expect(callback.args[0][0]).to.be.equal(err);
});

});

});

0 comments on commit 57b8318

Please sign in to comment.